Jump to content

How can I change the price off shipping due to the value of the shopping cart and producers?


adrian24a

Recommended Posts

Hi,

 

Sorry for my English,

 

I've got a problem with the shipping price. I have to change the shipping price for a value of the shopping cart and a producers. For example when the value shopping cart will be below 1000 Dolars and a producer will be for example "X" the shipping will be free, but when value of the shopping cart will be above 1000 Dolars and the producer will be for example "X" price of shipping will be 30 Dolars. How can I do it in Prestashop 1.6.

 

Thanks for any help.

 

Greetings

Link to comment
Share on other sites

Hello again

 

I thought you would be able to go to:

 

Back office > Catalog > Products > (click a product) > Shipping > (then add a shipper to that product)

 

Obviously you need to set up this delivery method first for it to show.

 

I have to say I have not tried this.

 

Paul

Link to comment
Share on other sites

On the cart I did it. I changed file: modules/blockcart.php and I add something like that on lines from: 64 - 76:

$nbTotElfaPrice = $params['cart']->getOrderTotal($useTax);
		foreach ($products as $product)
		{
			if(strstr($product['name'], "Elfa"))
			{
				$nbTotalElfaPrice = $nbTotElfaPrice;
				$nbTotalProducts += (int)$product['cart_quantity'];
			
			}
			else
				$nbTotalProducts += (int)$product['cart_quantity'];
			
		}

And  lines 81 - 87:

if(strstr($product['name'], "Elfa")&&($nbTotalElfaPrice>1000))
			{
				$base_shipping = 30;
				
			}
			else			
				$base_shipping = $params['cart']->getOrderTotal($useTax, Cart::ONLY_SHIPPING);

But I changed only a shipping costs in shopping cart. How can I changed shipping costs in order confirmation and order paymants?

 

 

Thanks

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