Cooolsport Posted November 3, 2017 Share Posted November 3, 2017 Hello My goal is it to make a local wishlist for not logged in Customers, since I'm running a B2B shop and we want only registerd users to log in, those already know what they want from us. The wishlist is just a feature for the customers of our customers, to put together what the want and than they send there wishlist to there local shop so they buy from us. I know I have to do this with javascript, but not knowing that language well(yet) I could use some help. heres the shop: https://cooolstore.com/ Link to comment Share on other sites More sharing options...
Cooolsport Posted November 6, 2017 Author Share Posted November 6, 2017 bump Link to comment Share on other sites More sharing options...
Cooolsport Posted November 7, 2017 Author Share Posted November 7, 2017 bump Link to comment Share on other sites More sharing options...
Simonas Invertus Posted November 8, 2017 Share Posted November 8, 2017 I am sorry, so what do you expect as an answer? What you want to achieve is really cool feature, however it is not possible to do in an hour or two. Hire a freelancer or go to code academy and start learning javascript. If you want to do it right javascript might not be enough, you might also need HTML, CSS and PHP. Link to comment Share on other sites More sharing options...
Cooolsport Posted November 8, 2017 Author Share Posted November 8, 2017 which files would affect it, I have the problem that the button as well as the wishlist are there, but the not logged in customer is not able to add the items yet. Link to comment Share on other sites More sharing options...
Simonas Invertus Posted November 8, 2017 Share Posted November 8, 2017 Existing wishlist module uses database to store information about products. You can just uninstall the module. Or do you want to edit existing module? That might be not the best choice. Template files for default wishlist module can be find in [your_shop]\themes\[your_theme]\modules\blockwishlist Link to comment Share on other sites More sharing options...
Cooolsport Posted November 8, 2017 Author Share Posted November 8, 2017 At the moment i try making <script> function add_to_my_wishlist(url,title,reference) { var product_list = localStorage.getItem('product_list'); var obj = []; if(product_list){ obj = JSON.parse(product_list); } obj.push( { 'image' : url, 'title' : title ,'reference' : reference} ); localStorage.setItem('product_list',JSON.stringify(obj)); console.log(product_list); location.reload(); } </script> work, i use it in the normal product_list.tpl tho ... I access the script with the button I have {if ($PS_CATALOG_MODE)} <a class="lnk_view btn btn-default" onclick='add_to_my_wishlist("{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}","{$product.name|escape:'html':'UTF-8'}","{$product.reference}");'><span ></span> {l s='add to wishlist'}</a>{/if}</a> So i only shows when logged out, since at the moment visitors are in catalogue mode. After pressing the button nothing happens tho Link to comment Share on other sites More sharing options...
El Patron Posted November 8, 2017 Share Posted November 8, 2017 if you want to understand scope of this, there is magento feature like this.....you could basically look at the 'hoops' they had to jump through. What seems simple under the hood is very complex. I've had a couple of my dev's kick tires on it and they never got anywhere....I wanted it to work like google shopping...I suppose I should come out of coding retirement and see if the old man can solve. But at least two months before I could start so don't wait for me. lol 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