I am trying to add the condition inside a commerce notification: "Order has one or more products where the sku contains.". What I basically need is "Order has only products where the sku contains".
The string that must be contained in the SKU is FOOBAR_
.
The operator is =
.
The amount: <?php print count($commerce_order->commerce_line_items); ?>
So the condition should just be true when all of the order's line items' products contain FOOBAR_
in their SKUs. But the php replacement does not seem to work. In the tooltip under PHP EVALUATION
it says:
PHP code inside of
<?php ?>
delimiters will be evaluated and replaced by its output. E.g.<?php echo 1+1?>
will be replaced by 2. Furthermore you can make use of the following variables: $commerce_order
When I put in a hardcoded amount it works, but then its not dynamic, obviously.