Filter shipping methods based on product field

  • Posts: 23
  • Thank you received: 0
13 years 7 months ago #14624

Hi Nicolas,
I am sure it is possible with a little bit of coding but that's what I am missing.

I have several shipping methods. What I need is presenting only a few to the shopper depending upon a characteristic of the products on cart. In fact, it suffices if only one of those products on cart has that special characteristic. I can add a field on product table, say 'characteristic' being 'yes' or 'no'.

I suppose I have to create a new shipping plugin and filter on onShippingDisplay function. If only one of the chosen products equals to 'yes' the new shipping method should be chosen (and then the restrictions should be calculated)

Would you help me on the code needed?

Thanks in advance
Emilio

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 7 months ago #14626

Why no just use the weight or volume restrictions ?
You could set a volume in the products which will trigger the display of the additional shipping methods. Then, in those shipping methods, you set a volume restriction so that they are only displayed when there is a volume in the cart.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 7 months ago #14627

It could be, not sure. We calculate shipping rates based upon a combination of weight and volume. You are talking about assign an outrange volume to the product so that only that would meet the shipping rate, aren't you?

I'll think on it. Just to have a second alternative, what I am describing, would it be possible?

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 7 months ago #14643

Yes of course. You could do that as well but it will require that you know PHP.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum