Skip to main content

Filter shipping methods based on product field

More
15 years 5 months ago #14624 by emilio
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.

More
15 years 5 months ago #14626 by nicolas
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.

More
15 years 5 months ago #14627 by emilio
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.

More
15 years 5 months ago #14643 by nicolas
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.223 seconds
Powered by Kunena Forum