Ben90 Posted January 16, 2016 Share Posted January 16, 2016 (edited) I tried upgrading from Prestashop 1.6.0.9 to 1.6.1.4 and I found several problems. This is one of them. (Please check the picture attached, it will be easier to understand) Basically, the prices that are showing in product page is incorrect. But when I add it to cart, it's showing the correct price. In other words, In BO, the combination is showing the correct additional prices, but what appears in FO is something else. ------------------------------------ I tried to create a new item and everything works well. It is simply impossible to re-creating all items. Oddly, based on this, I checked ps_product & ps_product_attribute to compare the new item created & the one from 1.6.0.9, everything looks the same except ean13 (it's blank by default if I create a new product in 1.6.1.4, while from 1.6.0.9 is 0). ------------------------------------- I tried to add a new combination such size, in the product that is imported from 1.6.0.9. It's showing the incorrect price. ------------------------------------- I tried as well to turn on DEV MODE but there's no error report coming up. I also tried to disable 3rd party modules & override, still nothing happens. Please check the picture attached. ------------------------------------- Prestashop Default Theme Edited January 16, 2016 by Ben90 (see edit history) 3 Link to comment Share on other sites More sharing options...
ramzes_84 Posted January 17, 2016 Share Posted January 17, 2016 I think I have the same problem. After update prices in category (list) viw are incorrect. Despite the presence of combinations (and their own prices), PS show a basic price of goods. Need help. Link to comment Share on other sites More sharing options...
Ben90 Posted January 20, 2016 Author Share Posted January 20, 2016 No idea at all, anyone? Link to comment Share on other sites More sharing options...
Erik De Martiis Posted January 20, 2016 Share Posted January 20, 2016 Are you using default template? If not, maybe there are some changes in 1.6.14 that affect price. I've seen in changes log these 2 rows: /themes/default-bootstrap/js/product.js /themes/default-bootstrap/product.tpl Check if with a default template the price are right. If yes, you have to change some code in your template. Regards Erik Link to comment Share on other sites More sharing options...
Ben90 Posted January 21, 2016 Author Share Posted January 21, 2016 Are you using default template? If not, maybe there are some changes in 1.6.14 that affect price. I've seen in changes log these 2 rows: /themes/default-bootstrap/js/product.js /themes/default-bootstrap/product.tpl Check if with a default template the price are right. If yes, you have to change some code in your template. Regards Erik Yes, I am using default template. I reckon we don't need to do some code changes if we are using the default one & it is such a non-convenient way of upgrading... Link to comment Share on other sites More sharing options...
Ben90 Posted January 24, 2016 Author Share Posted January 24, 2016 Any clue on this case? Link to comment Share on other sites More sharing options...
Frankyet Posted January 25, 2016 Share Posted January 25, 2016 I have the same problem, also using default theme The both files · /themes/default-bootstrap/js/product.js · /themes/default-bootstrap/product.tpl are total different with the previous one. Can i use the previous one without any problems? Link to comment Share on other sites More sharing options...
Ben90 Posted January 27, 2016 Author Share Posted January 27, 2016 I have the same problem, also using default theme The both files · /themes/default-bootstrap/js/product.js · /themes/default-bootstrap/product.tpl are total different with the previous one. Can i use the previous one without any problems? As you stated, I tried to use 1.6.0.9 for both of the files mentioned. The result is still the same... What's make this more difficult is there's no error message showing anywhere... Link to comment Share on other sites More sharing options...
ramzes_84 Posted January 27, 2016 Share Posted January 27, 2016 Ben90, nobody hepls us. I see on your screenshots that you are using discount. Can you deactivate it? I want to verify my version: I think the problem is here. Link to comment Share on other sites More sharing options...
Ben90 Posted January 27, 2016 Author Share Posted January 27, 2016 Ben90, nobody hepls us. I see on your screenshots that you are using discount. Can you deactivate it? I want to verify my version: I think the problem is here. Oh! You're right! The problem is with the "specific price" which also means DISCOUNT. Do you have a solution for this? Link to comment Share on other sites More sharing options...
ramzes_84 Posted January 28, 2016 Share Posted January 28, 2016 Unfortunately no. Now I have disabled mass discounts and are going to try to include the discount in each product (as I remember this is possible).I think this is a bug but poor knowledge of English does not allow me to report this error. It would be great if someone would do it. Maybe developers will fix the bug because there was not this issue before (only in 1.6.1.4.). Link to comment Share on other sites More sharing options...
Ben90 Posted January 29, 2016 Author Share Posted January 29, 2016 Unfortunately no. Now I have disabled mass discounts and are going to try to include the discount in each product (as I remember this is possible). I think this is a bug but poor knowledge of English does not allow me to report this error. It would be great if someone would do it. Maybe developers will fix the bug because there was not this issue before (only in 1.6.1.4.). I posted about this already on forge.prestashop but still no reply until now. It's been a few days. And this subforum also pretty quiet compare to the other ones... 1 Link to comment Share on other sites More sharing options...
calpee Posted January 29, 2016 Share Posted January 29, 2016 I have same problem in 1.6.1.4 if you have a product with combinations and with specific prices for a mass discount, prestashop don't works.. Link to comment Share on other sites More sharing options...
ang3lx Posted February 8, 2016 Share Posted February 8, 2016 same problem here any fix? 1 Link to comment Share on other sites More sharing options...
Ben90 Posted February 8, 2016 Author Share Posted February 8, 2016 I have same problem in 1.6.1.4 if you have a product with combinations and with specific prices for a mass discount, prestashop don't works.. same problem here any fix? We are abandoned, guys! 2 Link to comment Share on other sites More sharing options...
Ben90 Posted February 17, 2016 Author Share Posted February 17, 2016 Still no fix for this product discount on Prestashop 1.6.1.4? 1 Link to comment Share on other sites More sharing options...
ramzes_84 Posted February 18, 2016 Share Posted February 18, 2016 Nope... 1 Link to comment Share on other sites More sharing options...
pesciolinorex Posted February 21, 2016 Share Posted February 21, 2016 It is a big problem, I hope for a solution! 2 Link to comment Share on other sites More sharing options...
Niemand101 Posted February 22, 2016 Share Posted February 22, 2016 (edited) i found the fix change controllers\front\ProductController.php line 456: $combinations[$row[‘id_product_attribute’]][‘price’] = (float)Tools::convertPriceFull($row[‘price’], null, Context::getContext()->currency); change to: $combinations[$row['id_product_attribute']]['price'] = (float)$row['price']; and it will show correct price Edited February 22, 2016 by nieman101 (see edit history) 1 Link to comment Share on other sites More sharing options...
guanooo Posted March 8, 2016 Share Posted March 8, 2016 (edited) k@#0%! Same bullshit here. We are trying to solve this issue ASAP because if we don't - we're gonna loose a bunch of money.In our store the prices of the combinations in a product page looks OK and accurate. BUT ... when we add a product combination with an impact of the price to the cart, the price of the product in the cart is incorrect. In fact, extremely lower than the impact set in the admin panel. We've tried the trick with the default theme but that doesn't fix the issue. Will let you know if we have some positive progress.UPDATE: The impact on prices actually works correctly with the default user groups - Visitors, Customers. It does not work with custom created user groups. Edited March 8, 2016 by guanooo (see edit history) Link to comment Share on other sites More sharing options...
guanooo Posted March 9, 2016 Share Posted March 9, 2016 (edited) Well, after some precious hours spent by our development team (Thank you so much), I think we found a solution to the problem.Here is our solution which actually work for us (Prestashop 1.6.1.4): 1. Locate the file ... /public_html/classes/Product.php 2. Find the code on row 3036: // Attribute price //if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) { $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency); // If you want the default combination, please use NULL value instead if ($id_product_attribute !== false) { $price += $attribute_price; } //} 3. There is an array named $result. Before the If the price of the attribute exists. In the If the price vanishes and there is no change in this If to disapper We've put comments before the If rule and that does it - lines 3036 and 3042 in the file. I hope this helps. Let me know if you decide to give it a try. P.S. You may have different location of the file Product.php. Ask somebody who knows the code. Golden rule for our team: We upgrade to higher version of Prestashop only once per year. It's like the OS of a PC. Edited March 10, 2016 by guanooo (see edit history) 2 Link to comment Share on other sites More sharing options...
Ben90 Posted March 10, 2016 Author Share Posted March 10, 2016 i found the fix change controllers\front\ProductController.php line 456: $combinations[$row[‘id_product_attribute’]][‘price’] = (float)Tools::convertPriceFull($row[‘price’], null, Context::getContext()->currency); change to: $combinations[$row['id_product_attribute']]['price'] = (float)$row['price']; and it will show correct price It doesn't work, mate. I've just tried. Well, after some precious hours spent by our development team (Thank you so much), I think we found a solution to the problem. Here is our solution which actually work for us (Prestashop 1.6.1.4): 1. Locate the file ... override/classes/Product.php 2. Find the code between lines 428 and 436 // Attribute price //if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) { $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency); // If you want the default combination, please use NULL value instead if ($id_product_attribute !== false) { $price += $attribute_price; } //} 3. There is an array named $result. Before the If the price of the attribute exists. In the If the price vanishes and there is no change in this If to disapper We've put comments before the If rule and that does it. I hope this helps. Let me know if you decide to give it a try. Golden rule for our team: We upgrade to higher version of Prestashop only once per year. It's like the OS of a PC. Hi there, are you sure the location of the file is correct? There is no Product.php inside override directory. However, I found it in .../classes/Product.php // Attribute price if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) { $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency); // If you want the default combination, please use NULL value instead if ($id_product_attribute !== false) { $price += $attribute_price; } } I am not really sure which part I should put the comment, I tried to comment out all of the code above and it does nothing. I also tried to comment out the IF inside (line 3039 - 3041), but still no luck. 1 Link to comment Share on other sites More sharing options...
restartagain Posted March 10, 2016 Share Posted March 10, 2016 Same problem in my shop.....i put a post in Spanish forum and anybody cant help me. Please...help Link to comment Share on other sites More sharing options...
guanooo Posted March 10, 2016 Share Posted March 10, 2016 (edited) Put comments at lines 3036 and 3042. Row 2 and 8 below. // Attribute price //if (is_array($result) && (!$specific_price || !$specific_price['id_product_attribute'] || $specific_price['price'] < 0)) { $attribute_price = Tools::convertPrice($result['attribute_price'] !== null ? (float)$result['attribute_price'] : 0, $id_currency); // If you want the default combination, please use NULL value instead if ($id_product_attribute !== false) { $price += $attribute_price; } //} Edited March 10, 2016 by guanooo (see edit history) Link to comment Share on other sites More sharing options...
Informatica Ros Posted March 14, 2016 Share Posted March 14, 2016 (edited) After a lot of tries it worked for me with https://github.com/PrestaShop/PrestaShop/pull/4713/files Edited March 14, 2016 by Informatica Ros (see edit history) 3 Link to comment Share on other sites More sharing options...
Ben90 Posted March 15, 2016 Author Share Posted March 15, 2016 After a lot of tries it worked for me with https://github.com/PrestaShop/PrestaShop/pull/4713/files This one is work! Thanks! Link to comment Share on other sites More sharing options...
Ben90 Posted March 18, 2016 Author Share Posted March 18, 2016 I just realised the number is not right. The calculation is wrong... Link to comment Share on other sites More sharing options...
Ben90 Posted March 18, 2016 Author Share Posted March 18, 2016 (edited) So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... Edited March 18, 2016 by Ben90 (see edit history) 6 Link to comment Share on other sites More sharing options...
chewygmb Posted March 18, 2016 Share Posted March 18, 2016 (edited) Tried the above, does not work for me. I have product: Junior sizes of shirt X price Adult sizes of shirt Y price Price rule 25% off if buying 5+ On Y price if I select 5+ it gives X price -25%. Once in cart price shows fine. Edited March 18, 2016 by chewygmb (see edit history) Link to comment Share on other sites More sharing options...
killerkhan Posted March 23, 2016 Share Posted March 23, 2016 So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... Confirmed, This works for me. Thanks for sharing the solution. Link to comment Share on other sites More sharing options...
Ben90 Posted March 26, 2016 Author Share Posted March 26, 2016 Confirmed, This works for me. Thanks for sharing the solution. No worries. Sharing is caring Link to comment Share on other sites More sharing options...
keyless Posted March 30, 2016 Share Posted March 30, 2016 So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... Thanks for sharing this. Saved me hours of frustration. Works perfectly. Link to comment Share on other sites More sharing options...
mxmart.mx Posted March 31, 2016 Share Posted March 31, 2016 (edited) So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... This works for me too!! Thanks for your help. I can't believe such error from Prestashop! Edited March 31, 2016 by mxmart.mx (see edit history) Link to comment Share on other sites More sharing options...
ramzes_84 Posted April 1, 2016 Share Posted April 1, 2016 Thanks for your help. I can't believe such error from Prestashop! Absolutly agree! Link to comment Share on other sites More sharing options...
remalia Posted April 4, 2016 Share Posted April 4, 2016 (edited) So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... It worked for me too!!! Great job. Thanks Needs an urgent update from Prestashop for this error. Edited April 4, 2016 by remalia (see edit history) Link to comment Share on other sites More sharing options...
micelio Posted April 9, 2016 Share Posted April 9, 2016 can someone help me? I have the same problem after updating from version 1.5.4 to 1.6.1.4 prices do not remain but returns the first selection. I have two websites: http://www.micelimoto.com/it/ http://micelimoto.it/it/ in one of the combinations only work for users without group discounts, in practice does not update the price of the selection. in the other the selection of the combination after a few seconds returns to the first choice. Link with article combination 1: http://micelimoto.it/it/60-cavalletto-new-revers.html Link with article combination 2: http://www.micelimoto.com/it/174-cavalletto-reversibile.html Example of combination link 1:http://micelimoto.it/it/60-cavalletto-new-revers.html#/1-coloreruote-rosse/60-misura_perno-ducati_o_425_2745 Example of combination link 2:http://www.micelimoto.com/it/174-cavalletto-reversibile.html#/1-colore-ruoterosse/41-misura-pernoducati-425-3631 The links are different.. I can not find the solution, help Thanks! Elio Miceli Italian qualcuno può aiutarmi?ho lo stesso problema dopo aver aggiornato da 1.5.4 alla versione 1.6.1.4 i prezzi non rimangono ma torna la prima selezione.ho due siti web: in uno le combinazioni funzionano solo per utente senza gruppo di sconti, in pratica non aggiorna il prezzo della selezione. nell'altro la selezione della combinazione dopo qualche secondo ritorna alla prima scelta. link articolo con combinazione 1: http://micelimoto.it/it/60-cavalletto-new-revers.htmllink articolo con combinazione 2: http://www.micelimoto.com/it/174-cavalletto-reversibile.html esempio di link con combinazione 1: http://micelimoto.it/it/60-cavalletto-new-revers.html#/1-coloreruote-rosse/60-misura_perno-ducati_o_425_2745esempio di link con combinazione 2: http://www.micelimoto.com/it/174-cavalletto-reversibile.html#/1-colore-ruoterosse/41-misura-pernoducati-425-3631 i link sono differenti.. io non riesco a trovare la soluzione ;( Grazie! Link to comment Share on other sites More sharing options...
micelio Posted April 11, 2016 Share Posted April 11, 2016 I solved the problem in this world .. I went B.O. Settings> Products Here I selected the anchor separator product and I saved, Done! it worked for me.. Thanks il problema l'ho risolto in questo modo.. sono andato in B.O. Impostazioni>Prodotti qui ho selezionato il separatore dell'ancora dei prodotti ed ho salvato, Fatto! con me ha funzionato.. Grazie Link to comment Share on other sites More sharing options...
jupere Posted April 11, 2016 Share Posted April 11, 2016 Something else worked for me. I changed B.O. settings>products: Enable JqZoom instead of Fancybox on the product page to YES Now the price works fine in combinations. Link to comment Share on other sites More sharing options...
trevorgilligan Posted April 26, 2016 Share Posted April 26, 2016 will try and thanks @ben90 Link to comment Share on other sites More sharing options...
coccinelle Posted June 30, 2016 Share Posted June 30, 2016 Thanks & good job Ben___it works fine on 1.6.1.4 Link to comment Share on other sites More sharing options...
pedluis Posted October 26, 2016 Share Posted October 26, 2016 Sorry guys, i'm usin prestashop 1.6.1.4, and i'm getting a price error, but if i tried to replace product.php and ProductController.php i get only prices with 0. Anyone can help me? Link to comment Share on other sites More sharing options...
Medea Web Agency Posted February 3, 2017 Share Posted February 3, 2017 So, I replace: \controllers\front\ProductController.php \classes\Product.php with the master file of Prestashop 1.6.1.4 from https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/controllers/front/ProductController.php https://raw.githubusercontent.com/PrestaShop/PrestaShop/master/classes/Product.php It solved the problem... Thanks a lot. It worked for me Link to comment Share on other sites More sharing options...
saniaja Posted April 2, 2017 Share Posted April 2, 2017 Hi, tried changing the files (Product.php and ProductController.php), still ending up with Price 0 when product has attributes. When selecting "Enable JqZoom" instead of "Fancybox" the price of first attribute shows correctly but when switching to the other ones the price shows 0. http://sona2.dm-project.co.uk/ru/podushki/20-manima-blue.html Any other solutions? Link to comment Share on other sites More sharing options...
ronniee Posted July 26, 2019 Share Posted July 26, 2019 (edited) I have 1.6.1.4 version, and for users with group discount the price of products with combinations are not shown correctly if i put in cart, the price is ok I tried the @Ben90's above solution, but the page of products was not loaded at all. This page isn’t workingwww.xyz.com is currently unable to handle this request. HTTP ERROR 500 Maybe isn't compatible yet, i know that 1.6.1.4 is to old. Maybe someone has resolved this issue thanks Edited July 26, 2019 by ronniee (see edit history) 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