Przemysław Suszek Posted February 15, 2017 Share Posted February 15, 2017 Hi everyone, I must modify product list view. I want to display (for now I don't know how) information which tell is that product is already in cart without refresh the view or refresh a website. I don't know how to do that. Which part of code I should modify. Feel free to discuss. You can find my eshop at http://prestashop.suszek.info/3-women check third view - flat list. But this future should works on every view. Kind regards Link to comment Share on other sites More sharing options...
BalzoT Posted February 15, 2017 Share Posted February 15, 2017 (edited) Hi there! the feature you would like to develop has multiple files to be edited (from my point of view). At first, you should probably make an override for the category controller where you parse the product list to be shown and then add a smarty variable on each product so you know which of them is already in cart. Then you should modify the tpl file for the product list where based on the smarty variable that was set earlier you display the information you want on the product And as a final step is to add some extra lines of code to the javascript triggered when you add a product to the cart so you also add the info you want on the current product that was added. This approach will work without reloading the page and also will have the same information on the products even if you do so! Hope this helps Edited February 15, 2017 by BalzoT (see edit history) 1 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