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 ??

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Active » Fixed

Use the Data Comparison condition and compare to order:delivery-address:country

Woggers’s picture

TR,

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?

Woggers’s picture

Status: Fixed » Needs review
longwave’s picture

Title: Where is the Order: Shipping and Order: Billing condition sets for Flatrate Shipping?! » Add Rules conditions for multiple country comparison
Category: support » feature
Status: Needs review » Active

Seems to be a frequent request and is technically a regression from D6, so changing to a feature request.

TR’s picture

I 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.

longwave’s picture

I 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.

Woggers’s picture

So 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.

longwave’s picture

You 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.

Woggers’s picture

You 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 ?

longwave’s picture

When you create the component set you need to add a variable of type Entity: Order to be able to access the data selector.

Woggers’s picture

Thanks for the reply longwave!

Wasn't sure how the Rules worked as far as data selector variables. This opens up a lot.

Cheers.

tehn’s picture

Category: feature » support

I 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.

longwave’s picture

Category: support » feature
AJen’s picture

You can group the countries using the Global Quote Module

longwave’s picture

Status: Active » Needs review
FileSize
1.99 KB

This patch adds back the "Check an order's shipping/billing country" conditions that were available in 6.x.

TR’s picture

Status: Needs review » Reviewed & tested by the community

I tested this - it applies and works properly.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed #15.

AJen’s picture

Works 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.

TR’s picture

@Aussiejen: That functionality is built into Rules. You can clone or export at admin/config/workflow/rules

AJen’s picture

thanks heaps. I had looked there but failed to look under components

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.