SonoguN Posted September 2, 2013 Share Posted September 2, 2013 Hi Not sure if this is native functionality for the wishlist module. But I need a wishlist to automatically be created when a customer registers on the site... or when they click the "add to wishlist" button. Thanks Link to comment Share on other sites More sharing options...
Frank1957 Posted October 20, 2013 Share Posted October 20, 2013 Hello, did you resolve this issue with the wishlist, I want to do the same thing. Link to comment Share on other sites More sharing options...
Eli Ivanova Posted January 25, 2014 Share Posted January 25, 2014 Hi, could someone share ideas how this can be done. Thanks. Link to comment Share on other sites More sharing options...
Eli Ivanova Posted January 26, 2014 Share Posted January 26, 2014 any feedback? Link to comment Share on other sites More sharing options...
Eli Ivanova Posted January 26, 2014 Share Posted January 26, 2014 I found a solution. Let me first mention that Wishlist shall not be created at the moment of customer registration, because the Wishlist module is not mandatory and may not be installed. Instead the default wishlist behavior shall be set within the module blockwishlist. To do that in modules/blockwishlist/blockwishlist.php, in the function hookRightColumn, line 188 (for PS version 1.5.6.0) - there is if statement: if (!sizeof($wishlists)) $id_wishlist = false; It shall be replaced with: if (!sizeof($wishlists)) { $wishlist = new WishList(); $wishlist->id_shop = 1; $wishlist->id_shop_group = 1; $wishlist->counter = 1; $wishlist->name = 'my wishlist'; $wishlist->id_customer = (int)($this->context->customer->id); list($us, $s) = explode(' ', microtime()); srand($s * $us); $wishlist->token = strtoupper(substr(sha1(uniqid(rand(), true)._COOKIE_KEY_.$this->context->customer->id), 0, 16)); $wishlist->add(); $this->context->cookie->id_wishlist = (int)($wishlist->id); $id_wishlist = (int)($wishlist->id); } Link to comment Share on other sites More sharing options...
vansrv7 Posted January 31, 2014 Share Posted January 31, 2014 Hi Eli, thank you for modification, I'll test it soon. By the way I noticed a couple issues with the wish list that, maybe, you are able to solve (I don't know if it's just me with this issue or is the normal way it works): 1. when a customer clicks on "add to wish list" on the product page, if there is no wish list created, he doensn't receive any message. It will be usefull if a message pop up (ie. "To add a product to the wish list, you first need to create one. Click on the button to create your wish list") and then the customer is redirected to the wish list page to create it. 2. if I click on add to wish list, I don't see any message "ADDED to your wish list".. it works but it's not visible. So, I think it doens't work and click again and again... I'll have more than one item in the wish list but, unless I go there to check, I don't know it. Link to comment Share on other sites More sharing options...
Eli Ivanova Posted February 2, 2014 Share Posted February 2, 2014 vansrv7, I agree that solving those two issues would improve usability of the module. I can say about (1) - if you apply my patch above, there will always be a wishlist, so no need of popup with message. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now