Continue if with 2 Attributes
-
Hey guys,
If a costumer orders the same product twice but with different variations (e.g. Skirt#123 black and Skirt#123 green) I want to do something.
I have:$variation = $item['myAttribute']; /*var_dump($variation) = string(5) "black" string(5) "green"*/ if (strpos($variation,"black")===false){ //do something } if (strpos($variation,"green")===false){ //do something } if (strpos($variation,"white")===false){ //do something } if (strpos($variation,"yellow")===false){ //do something } if (strpos($variation,"pink")===false){ //do something }
But when one attirbute is found (e.g black and green) the if never reaches the “green” section, because of the black it jumps right out too early.
How can I pack this that it works?Thanks in advance.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Continue if with 2 Attributes’ is closed to new replies.