Hello,
Can you tell me how I can compare, in the composant, the shipping country address with iso code.
I select in "condition" : Compare order address component
than I select the "country" in the adress, operator "equal" and in the bloc text here is what I write on three different line

FR
MC
AD

but it takes all the lines to compare.
It works when I placed just "FR", how to ask for a comparaison on all the three lines?
I try separate by "|" or ","

Comments

Joni Haeck’s picture

I'm having a similar issue. I compare the country of the shipping address with a value(BE). But it does not work...

zorax’s picture

You can not compare several data at this place.
I found a solution by allowing the php filter module and place this code in all the collisimo components conditions :

$profile_wrapper = entity_metadata_wrapper('commerce_customer_profile', [commerce-order:commerce-customer-shipping:profile-id])->value();
$zoneA = array('AT','BE','CY','DE','DK','EE','ES','FI','GB','GG','GI','GR','HU','IE','IS','IT','JE','LI','LR','LT','LU','LV','MT','NL','NO','PT','SE','SM','VA');
if ( in_array( $profile_wrapper->commerce_customer_address['und'][0]['country'], $zoneA))  {
  return true;
}
return false ;
tr’s picture

Issue summary: View changes
Status: Active » Fixed
tr’s picture

Status: Fixed » Closed (fixed)