Jump to content

Adding wholesale price to specific price


Recommended Posts

Hello everyone,

 

My store uses two variables to determine pricing for thousands of products, so I am trying to base my pricing in a way that i can upload two different prices from a csv import. I have been trying to do this by adding specific price to wholesale price but i am a coding newb and haven't been able to get it quite right.

 

For this example, my specific price is $5.38 and my wholesale price is 1.50. I want the price to output $6.88.

 

 

In prestashop 1.4.9.0 I made a change in /admin/tabs/Product.php lines 1831-1835

 

from:

 

if (!$specific_price || $specific_price['price'] == 0)

$price = (float)$result['price'];

else

$price = (float)$specific_price['price'];

 

to:

 

if (!$specific_price || $specific_price['price'] == 0)

$price = (float)$result['price'] + 1.50 ;

else

$price = (float)$specific_price['price'] + 1.50 ;

 

This change added $1.50 to all of my products on the product pages but each product has a unique wholesale price. I know i'm on the right track but I dont know how to insert the variable for wholesale price. I've substituted the "1.50" with things like "$id_wholesale_price", "wholesale_price", "$wholesale_price", etc to no success. I also probably have to make changes in /themes/product.js but i am not sure.

 

I've been tinkering with this for a few days now, can someone please help? Thank you in advance.

Edited by jewele8 (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
  • 4 years later...

@Dh42

 

I think the easiest way to do it would be for Prestashop to make it possible to set profit margins based on Customer Group, by marking UP from wholesale. Then the customer front office would display the Retail price, the selling price and the discount.

 

It would be done automatically by the group discount that comes standard with Prestashop.

 

But for some reason PS is highly resistant to making this possible...and no module exists to allow for this function.

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...