Monday 14 March 2011 1:35:42 am
Hi, I need help to traverse all options in a multioption. I use the Product-class with a new multioption-attribute called "product_properties". I need a function to check if the optionID the user chose on the front-end matches an option in the list, and return true if a match is found. This way I can check if e.g. the user chose "Red" as the "Color" on a product. In pseudo-code this is what I need: Parameters: postedOptionID, currentObjectID 1. Fetch attribute "product_properties" (multioption) on object <currentObjectID>. 2. For each option for "Color" in "product_properties" 2.1 If postedOptionID == optionID 2.1.1 return true Thanks
|