Afriluka Posted June 22, 2021 Share Posted June 22, 2021 Hello everybody, I want to upgrade my store to Prestashop 1.7.7.1 I migrated my old products from 1.6.X. Then I worked on many modules and the design. Now I wanted to go live. But on the last test I found out, that the unit price is not showing correctly. Some products were showing the unit price and others not. Then I found out, that under the price tab in the unit price field some products are set to zero. Which of course means no unit price. So of course you can't see any unit price. So first I thought maybe a problem occured while importing our products from our old shop. So I tried to add the unit price manually. At first it looked good. But suddenly the same thing happened again. Some of the products I updated manually again had no unit price. And when I checked I saw that again the unit price was set to zero. So I tried to find out when this happens or how. It seems when I change a combination it sometimes happens. But it always happened when I disable and then enable a product from the product list. Then always the unit price field is set back to zero. When I checked on a fresh shop I had the same problem again. Then I upgraded to 1.7.7.5 but still the same issue. Could someone please check if someone also have the same problem? To find out if it is a general problem with prestashop 1.7.7.X? And then to report the bug? Thank you so much Link to comment Share on other sites More sharing options...
Inodia Posted September 14, 2021 Share Posted September 14, 2021 Hello, for those interested, here is a possible solution. It's a patch not a properly solution (see controller override...) Used for Prestashop 1.7.7.7. Add this line in the file : controllers > admin > AdminImportController.php Line 1889 if(isset($info['unit_price']) && $info['unit_price'] > 0) { $product->unit_price = $info['unit_price']; $product->unit_price_ratio = $product->price / $info['unit_price']; } Good day ! 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