php - Magento - Single Custom Product Attribute with Array of Values -
There is a need for Magento to provide me an Orange Custom Product feature, which will list all its values Outputs. The basic premise is a list of product materials ... On a per product basis we need to enter water, salt, colors (for example) - and for this it should be presented as a list in the front end.
My argument has been made to use the standard text field attribute so far, values separated by commas in the back-end have been entered and then use that string as that array. Is used to try, so that I can use foreign currency to make an unmarked list.
So far, I can resize the entire string as a list item, but the string is interpreted as an array of my personal values so far I have been stumped! See below ...
The content of the text field field has the value of "water", "salt", "color" - except for quotation marks and commas only that the list is for an array Will be prepared.
& lt ;? Php $ ingredientsArrayContent = $ this-> GetProduct () - & gt; GetSpa_productingredients (); $ Content array = array (content content of $$); ? & Gt; & Lt; Ul & gt; & Lt ;? Php reset ($ contentArray); Forex Currency ($ element $ $ as element $) {echo " $ element value Then this output is being done at the front end:
& lt; Ul & gt; & Lt; Li & gt; "Water", "salt", "color" & lt; / Li & gt; & Lt; / Ul & gt; What do I want to achieve:
Am I complaining about this and is there something really clear in Magento?
Perhaps instead:
$ ingredientsArray = array ($ IngredientsArrayContent); Use the $ ingredientsArray = array (blast (",", $ ingredientsArrayContent)):
Is your feature set as: "Water, salt, color "Or" water, salt, color "may need to change your delimiter or you may need to change your property values,
Comments
Post a Comment