Jump to content

Unit Price Problem / Bug?


Recommended Posts

I haven't really used unit price before but now I have a product that I would like to use it but the adjust unit price feature in combinations seems to not work.

 

Here is an simplified example of what is happening.

 

Retail Price is $25

Unit Price is $5

 

That part works fine. Case of 5 units each is $5 for a total of $25.

 

Now I have a combination where it is just a larger case 25 units. This adds $90 to the retail price for a total of $115. That works fine.

 

The unit price is where I start having issues. Prestashop returns a unit price of $23. Obviously it is just taking the $115 / 5 which it has determined is the ration of retail to unit price.

 

The unit price is supposed to be $4.60 so I tried to add reduce unit price by $18.40 ($23-18.40=$4.60) but that has ni impact.

 

What am I doing wrong?

 

 

I am using PrestaShop version 1.6.0.9

Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

The only solution I found was to just keep adjusting the price until it displayed correctly. That isn't the greatest solution but it worked.

 

I've upgraded to newer versions since then so not sure if this problem is still present. Hopefully will have time to test in the near future

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...

Hello,

 

For those who have the same problem as I had, I could find a solution (not sure if the propper one, but it works for me).

So, go to your AdminImportController.php file and make sure that in the 247 line where it says: 

 

'unit_price' => array('label' => $this->l('Unit price')), 

 

and change it to:

 

'unit_price_ratio' => array('label' => $this->l('Unit price')),

 

Notice that 'unit_price_ratio' is the name of my Database column for this item (unit price). You need to make sure yours is the same. If not change the unit_price_ratio accordingly.

 

Thanks for the other suggestions that lead me to this solution.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...