Kurt Moskjaer Anders Posted November 3, 2014 Share Posted November 3, 2014 (edited) In my webshop running PS 1.6.0.6, I need to calculate product prices on the fly. If the product SKU is like "641,101", the price has to be calculated from the price of the product with the SKU "641,105" (ending with 5 instead of 1), by dividing it with 22. I have created a custom class Product.php in override/classes and everything is working just fine, when viewing the product page and the product list of the category, as long as none of the products has any combinations. If I create combinations to the products, the price on the product page is shown correctly. On the product list of the category, all calculated product prices are zero (0). If I then delete the combinations on one of the calculated products, the product price are shown correctly on the product list as well. Any idea where this price is calculated and what could be the problem? P.S.: I'm using the default Prestashop-theme Edited November 3, 2014 by Moskjaer Online (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted November 3, 2014 Share Posted November 3, 2014 combination prices are loaded in js on your front product page, and then by js the price is actualized on the fly (in back, with ajax call prices are verified) Link to comment Share on other sites More sharing options...
Kurt Moskjaer Anders Posted November 27, 2014 Author Share Posted November 27, 2014 Thank you for your response, Eolia. Do you know in which file the combination prices are loaded with js? Link to comment Share on other sites More sharing options...
Eolia Posted November 28, 2014 Share Posted November 28, 2014 Yes, in the ProductController (/controllers/front/) with the function assignAttributesCombinations() 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