Hi! I'm trying to figure out to write an expression to compare the value of the current variable inside a foreach loop, in PHP this is straight forward
if MVT this is sort of what I'm trying to do
The above code doesn't work, i don't get a compiling error but i just don't get any options.
I basically want to skip a certain payment method if it's not available at the moment, I can't remove them from the backend because it says the payment method is in used by another order...
Any help would be appreciated!
Code:
foreach($array as $value){ if ($value=='visa'){ // do something } }
Code:
<select name="PaymentMethod" id="PaymentMethod"> <mvt:foreach array="paymentmethods" iterator="method"> <mvt:if expr="l.settings:paymentmethods:code NE visa"> <option value="&mvte:method:module;:&mvte:method:code;">&mvt:method:name;</option> </mvt:if> </mvt:foreach> </select>
I basically want to skip a certain payment method if it's not available at the moment, I can't remove them from the backend because it says the payment method is in used by another order...
Any help would be appreciated!
Comment