- Posts: 23
- Thank you received: 0
Filter shipping methods based on product field
15 years 5 months ago #14624
by emilio
Filter shipping methods based on product field was created 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
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.
15 years 5 months ago #14626
by nicolas
Replied by nicolas on topic Re: Filter shipping methods based on product field
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.
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.
15 years 5 months ago #14627
by emilio
Replied by emilio on topic Re: Filter shipping methods based on product field
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
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.
15 years 5 months ago #14643
by nicolas
Replied by nicolas on topic Re: Filter shipping methods based on product field
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