Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have just enabled Flat rate shipping and am trying to set a flat rate shipping price for a particular shipping country.
1 - I create my new Flat rate Shipping Method
2 - I click EDIT to modify my new flat rate method
3 - Under CONDITIONS I select ADD CONDITION
4 - I am looking for the Order: Shipping conditions to select Check an order's shipping country to make sure this rate gets automatically selected based on Shipping Country but it's not there.
The only Order related areas that are available as conditions are:
Order
Order: Product
Order: Shipping Quote
am I missing something here ??
Comment | File | Size | Author |
---|---|---|---|
#15 | 1313684-rules-multiple-countries.patch | 1.99 KB | longwave |
Comments
Comment #1
TR CreditAttribution: TR commentedUse the Data Comparison condition and compare to order:delivery-address:country
Comment #2
Woggers CreditAttribution: Woggers commentedTR,
Thanks for this. I found this in another issue thread where you suggested the same thing and I can now do a 1 to 1 data comparison on order:delivery-address:country.
What if I want to select multiple countries from a list though?
Similar to this comment: http://drupal.org/node/1214396#comment-4875738
Is this not possible with the current Rules integration?
Comment #3
Woggers CreditAttribution: Woggers commentedComment #4
longwaveSeems to be a frequent request and is technically a regression from D6, so changing to a feature request.
Comment #5
TR CreditAttribution: TR commentedI don't know if Rules configurations forms can allow multiple selections. If they can, then it's something we can fix. If not, then I don't think we can do too much here.
Comment #6
longwaveI don't think we can extend the "data comparison" condition but it should be possible in a custom condition similar to the "Check an order's products" condition.
Comment #7
Woggers CreditAttribution: Woggers commentedSo essentially at the moment you have to add multiple OR conditions for country comparisons then to accomplish the same thing?
Is there an ability then to maybe CLONE conditions sets?
This would then at least make it easier to create additional conditions that require multiple country comparisons without having to tediously do it for each new flat rate.
Comment #8
longwaveYou don't need to clone a condition set. You can create a single Rules component that matches your countries, then use "And: [component name]" as the single condition against each of the shipping rules.
Comment #9
Woggers CreditAttribution: Woggers commentedYou don't need to clone a condition set. You can create a single Rules component that matches your countries, then use "And: [the condition set]" as the single condition against each of the shipping rules.
Longwave, I just went to Rules and Components and attempted to add a new Condition (AND) component called European Shipping.
I then go into the component to try and add all the OR's for European Countries but it appears the order:delivery-address:country data selector is not available here ?
Comment #10
longwaveWhen you create the component set you need to add a variable of type Entity: Order to be able to access the data selector.
Comment #11
Woggers CreditAttribution: Woggers commentedThanks for the reply longwave!
Wasn't sure how the Rules worked as far as data selector variables. This opens up a lot.
Cheers.
Comment #12
tehn CreditAttribution: tehn commentedI tried to implement it during few day and no out coming results =( Can someone explain in details how to do it coz I have already had brain pain. Unbelievable how hard to organize shipping flats by countries.
I need EU, American, African counties to have separate shipping quotes, but I can understand how to do it simply. I dont like to create Compare data for each county - this is wrong way.
Comment #13
longwaveComment #14
AJen CreditAttribution: AJen commentedYou can group the countries using the Global Quote Module
Comment #15
longwaveThis patch adds back the "Check an order's shipping/billing country" conditions that were available in 6.x.
Comment #16
TR CreditAttribution: TR commentedI tested this - it applies and works properly.
Comment #17
longwaveCommitted #15.
Comment #18
AJen CreditAttribution: AJen commentedWorks perfectly, thanks heaps. Is there any plans to be able to 'clone' the rules. I'm after an easy way to duplicate a long list of selected countries into another rule.
Comment #19
TR CreditAttribution: TR commented@Aussiejen: That functionality is built into Rules. You can clone or export at admin/config/workflow/rules
Comment #20
AJen CreditAttribution: AJen commentedthanks heaps. I had looked there but failed to look under components