I am trying to find a way to update the accounts already created in admin panel.
During the create process, the account was created mistakenly in Admin section (caused user to not login via frontend).
See Screenshot: http://puu.sh/9Rjvp/6f4fffd1c6.jpg or http://i.stack.imgur.com/0Q2vm.jpg
I am looking for a programmatic approach using which I can update the account created in value to "website" after-which the customer can be able to login to site. (this can be database direct update if its best suite)
Reason behind for looking a programmatic solution is clear for following reasons.
The number of effected accounts are about 500+
Each or many of these accounts have orders belonging to their account (therefore re-create is not a good approach).
Let me know what database values I have to change for this fix or what should I need to instruct to my custom module?
Any help is highly appreciated.
Following is customer update code snippet:
$customer = Mage::getModel('customer/customer')->load(1212);
$customer->setWebsiteId(2)
$customer->save();
The above code will update website to 2 for customer 1212.
God luck!
Related
I've a question for my personal project. I've two websites prestashop 1.7.7.x (two databases). I'cant active multisite on this shop this functionnality is instable
I search how to duplicate customers accounts avaibles in ps_customer.
I don't want to synchronize the database. When a customer registers on site A I want to insert the customer account on SITE B and vice versa.
My first idea :
Make a php script automaticaly run with CRON TASK, this script check on db1 every account with condionnaly email and compare with db2 if not email found, I insert the data.
I've a problem with my sql query : (many many data returned,
a cause of the Cartesian product)
select db1.ps_customer.email from db1.ps_customer, db2.ps_customer where db1.ps_customer.email!=db2.ps_customer.email;
If you have any suggestions or information that could help me. Thank you very much.
Have a nice day,
The "Prestashop way" to handle this is by creating a module that you will install in both sites connected to the customer registration hook (actionCustomerAccountAdd) that "invokes" the prestashop API webservice on the other website , so when a customer succesfully register the hook is fired and customer with the same data is created on the other side.
You should start here : https://devdocs.prestashop.com/1.7/modules/
And here more details about webservice : https://devdocs.prestashop.com/1.7/webservice/
Remember that both sites must share the same cookie_key in the configuration file otherwise the hashed passwords from site A will not work on site B and vice versa.
In our opencart website we are planning to give open access to users where people can access the webiste without login or registration , can any once tell me how to give open access
If you mean an OpenCart store - yes it is possible to make a purchase without logging into the website. There are two ways to do that.
1 - You use the Guest checkout option, which is standard in the OpenCart checkout process. You do not need to have an account in the store and you can just fill in your personal details as a guest.
2 - There is an extension for OpenCart that also lets you skip the registration and login process in the website. It’s called SuperQuickCheckout. The way it works is it lets you make an order by just filling out two fields with your phone number and email address. The order is submitted. From there on the store owner contacts you for your personal details and the order is processed manually.
If however you mean the official OpenCart website - there is no way to make a purchase without being logged in. Except if you are downloading a free product.
I hope that’s helpful! Good luck and have fun with OpenCart!
Thanks..
I'm creating a site where a user will be allowed to upload a file once they make a payment:
example: Basic Plan for $9.99 or Enterprise Plan $20.99
when a user chooses a plan they will then be prompted to upload a file.
I'm looking for some direction on what the best way to go about doing this is, any suggestions as far as plugins, or the best process to do something like this.
I will be using stripe's API , what do you think is the best workflow, I already know how to use stripes API with laravel , my concern is how to make the user pay , then allow the user to upload once and only if payment is received.
What should by database table look like?
What should the process look like for the user.
I was thinking
1.User creates an account
2.User confirms email then is redirected to choose plan page, user chooses plan
3.User makes payment, then is redirected to an upload page.
4.User uploads file.
any ideas, or maybe a better solution?
This is not your typical e-commerce site with a whole bunch of products where you choose something then pay.
This site will require a user to make payment in order to allow them to upload one file to the platform.
any direction with as much detail would be greatly appreciated.
of course I'm building this system on laravel.
Honestly, your plan is solid.
Have a spot where they can manage their documents, just in case the payment does not get approved immediately.
depending on how your subscription works i.e. monthly, yearly or once off you probably need to store some sort of a token that is valid for a period of time. creating this token after payment has been verified.
For your file uploads table I would suggest making use of Morph relationships. This will allow you to to have one table for many different file uploads, as you will have 2 columns a itemable_type and itemable_id the type is your model and the id your record id. to get these columns add this to your migration $table->morphs('itemable'); Laravel will make them for you.
using a trait for your file uploads would be a good idea as well as you can call it up and pass it parameters with a single line whereever you need it, or call it with some complex logic.
What i need is a solution to create a magento customer from an external php application (developed in the yii framework) connected directly to a magento database. The customer info will be entered using a form. The only fields from the magento customer that i am really interested in are customer email and password i.e. i want to create a customer with minimum field that only include email and password as form entry. However, i do not mind adding first name and last name to the form if they are "required" fields. I know that for Magento customer creation, webstore_id and store_id are required, but these can be hard-coded to default values thats okay.
I found code online that demonstrate how to create a customer while utilizing the Mage.php file. Some links to these tutorials include:
http://www.douglasradburn.co.uk/adding-new-customers-to-the-magento-store-programmatically/
http://inchoo.net/ecommerce/magento/programming-magento/programmaticaly-adding-new-customers-to-the-magento-store/
But in these tutorials, they have hard-coded the customer info. Like i said, my requirements include using forms on a php page from an external php application in yii framework.
Solutions will be greatly appreciated.
Create a module in your magento for retrieving the informations from your script and then implement this kind of stuff :
Create customer programmatically
I have 2 zencart site running and 3rd one is about to be live. I want each user registration and coupon will be available across those 3 sites. Actually I want user registration globally so user can access any site among these 3 with same login info. And update specific coupon info of any user if any changes has been made by him. Is it possible? pls share any idea you have. Thanks
What about having 3 separate databases but share customers and coupons tables
I've done something similar