Jump to content

Can delivery cost be a negative value(give discount), and can a product be locked to a certain carrier?


Recommended Posts

Is it possible to add a delivery choice that has a negative value? For example, i order some books, and i can choose from expressmail 10$, snailmail 5$, or pick-up at warehouse -3$ that means if customer choose pick up at warehouse he will get a 3$ discount. Is it possible to do something like this?

Another question is if its possible to lock certain products to only one type of delivery? for example if you buy books and shoes you can chose any delivery you want, but if you buy clothes you can only choose snailmail. Is it possible to do something like that?

Thank you.
Best regards
Peter

Link to comment
Share on other sites

  • 1 month later...

Hi Peter,

Regarding the -/-3,00 discount on pick up, I have the same question as you have, hope you have found a solution in the meantime?
Iam trying to configure vouchers for it, but this solution is far from ideal.

thank you
kind regards
Marianne

Link to comment
Share on other sites

  • 9 months later...

Hi guys,

 

I was also looking for a way to place a free shipping (as a discount) on specific products and, as I found a solution, I thought I'd share with whoever needs it.

 

Changing the additional shipping costs seemed to be the easiest way to do it, but as you also noticed it didn't work. I tried updating the field (additional_shipping_cost) directly in the database and this was possible and it also seemed to work fine.

 

After looking a bit in the code, I managed to find out how to avoid the field from being validated.

 

In the directory classes, open up Products.php , go to line 214 (in my 1.4.5) and change

'additional_shipping_cost' => 'isPrice',
to
/*'additional_shipping_cost' => 'isPrice',*/

 

The field will no longer be validated, so you can enter any value you wish. If it's a negative value, shipping costs will be deducted by this value. If you write in the exact shipping costs, they will be displayed as 0. Just make sure you use the right amount(in my case I had write in the VAT free amount).

 

I have not tested it completely nor tried to do it on a different Presta version. Please make sure you create back-ups of your files and do this at your own risks. I will come back with infos if I find any issues with it.

 

Hope it helps

Link to comment
Share on other sites

  • 1 month later...

Hi guys,

 

I was also looking for a way to place a free shipping (as a discount) on specific products and, as I found a solution, I thought I'd share with whoever needs it.

 

Changing the additional shipping costs seemed to be the easiest way to do it, but as you also noticed it didn't work. I tried updating the field (additional_shipping_cost) directly in the database and this was possible and it also seemed to work fine.

 

After looking a bit in the code, I managed to find out how to avoid the field from being validated.

 

In the directory classes, open up Products.php , go to line 214 (in my 1.4.5) and change

'additional_shipping_cost' => 'isPrice',
to
/*'additional_shipping_cost' => 'isPrice',*/

 

The field will no longer be validated, so you can enter any value you wish. If it's a negative value, shipping costs will be deducted by this value. If you write in the exact shipping costs, they will be displayed as 0. Just make sure you use the right amount(in my case I had write in the VAT free amount).

 

I have not tested it completely nor tried to do it on a different Presta version. Please make sure you create back-ups of your files and do this at your own risks. I will come back with infos if I find any issues with it.

 

Hope it helps

 

But the problem is if you will do it this way and someone adds the product twice the negative cost will be deducted twice..

Link to comment
Share on other sites

  • 3 weeks later...

But the problem is if you will do it this way and someone adds the product twice the negative cost will be deducted twice..

 

Yes, you are right! Additionally to that, adding a "free shipping" product + a non free shipping product would also reduce the total shipping costs.

 

This solution, besides the fact that its not suitable for all situations, should only be applied for special products, not for an entire website. Managing these costs can be quite an issue too.

Link to comment
Share on other sites

  • 3 years later...

Still looking for a solution? I am !

 

I'm thing of a carrier with lower price (and place a comment in it's name: "use ONLY for 1 item per order, mailbox delivery)

and write a notification for the client to choose the right shipping method.

 

If nobody has a 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...