Shipping by product Weight

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hello ,

I need help doing the following:

In the shopping cart, if the product weighs more than 15 kg, the shipping method (RYAD) is shown only ,

And if the product weight is less than 15 kg, the shipping method (website)is shown only ,

If the shopping cart contains a product of less than 15 kg and a product of more than 15 kg, two shipping methods are shown

If I used Shipping Director Plugin What is the Expression ?

Thank you
6 years ago
You didn't mention which Shipping Provider you are using.  I'll assume it's "Shipping By Fixed or Weight", and that you have set up two methods you mentioned.  In that case, in the Shipping Director configuration there would be one Option record that 'calls' "Shipping By Fixed or Weight" and uses the Name Expression field as described in this blog (if the expression evaluates to blank "", then the method is suppressed)

In your case, it would look like this:

Order
Type
Name
Expression
Rate Expression
Name Expression

10
Boolean
AnyProductsOver15Kg
Items.Any(Product.Weight >= 15)


20
Boolean
AnyProductsUnder15Kg
Items.Any(Product.Weight < 15)


100
Option
Shipping
true
Shipping.FixedOrByWeight
[$Name] = "RYAD" AND [AnyProductsOver15Kg] ? [$Name] : [$Name] = "website" AND [AnyProductsUnder15Kg] ? [$Name] : ""

Be sure to spell your method names correctly and in the same case (upper/lower).
6 years ago
New York wrote:
You didn't mention which Shipping Provider you are using.  I'll assume it's "Shipping By Fixed or Weight", and that you have set up two methods you mentioned.  In that case, in the Shipping Director configuration there would be one Option record that 'calls' "Shipping By Fixed or Weight" and uses the Name Expression field as described in this blog (if the expression evaluates to blank "", then the method is suppressed)

In your case, it would look like this:

Order
Type
Name
Expression
Rate Expression
Name Expression

10
Boolean
AnyProductsOver15Kg
Items.Any(Product.Weight >= 15)


20
Boolean
AnyProductsUnder15Kg
Items.Any(Product.Weight < 15)


100
Option
Shipping
true
Shipping.FixedOrByWeight
[$Name] = "RYAD" AND [AnyProductsOver15Kg] ? [$Name] : [$Name] = "website" AND [AnyProductsUnder15Kg] ? [$Name] : ""

Be sure to spell your method names correctly and in the same case (upper/lower).



Thank you for your reply ,
I did but this error showing "Shipping options could not be loaded" any solution ?
6 years ago
Export your Shipping Director configuration, and send it to support at noptools.com
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.