Tags/topics: 
2
Answers
Vote up!
0
Vote down!

How to define maximum shipping cost rule

Hi all,

I use some calculations rules to define shipping cost for commands with weight over 100Kg and some flat rates which depends of postal codes.

This is ok but now, i want to have a rule over these to define a maximum of 100€ shiiping cost.

Somebody can help me on to do this or giving me some advises ?

I tried to do calculations but nothing was ok.

Thanks in advance.

Asked by: Anthony Rabot
on December 9, 2014

2 Answers

Vote up!
0
Vote down!

How about this:

{ "rules_maximum_pricing_amount" : {
"LABEL" : "Maximum Pricing Amount",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "commerce_price", "commerce_product_reference" ],
"ON" : { "commerce_product_calculate_sell_price" : [] },
"IF" : [
{ "commerce_price_compare_price" : {
"first_price" : [ "commerce-line-item:commerce-unit-price" ],
"operator" : "\u003E=",
"second_price" : { "value" : { "amount" : 10000, "currency_code" : "USD" } }
}
}
],
"DO" : []
}
}

Answer by: garpy
Posted: Dec 9, 2014
Vote up!
0
Vote down!

This answer was not the answer to the given question, if i'm right. The question is still unanswered. Is there a solution for this? I tried to find one, but it was not possible to find one..

sagacity
Answer by: sagacity
Posted: May 19, 2015