[英]how to assign multiple values to an attribute through text field in Magento?
I want to create an attribute in Magento CE, in such a way that I can assign multiple values to it through text field. 我想在Magento CE中创建一个属性,以便可以通过文本字段为其分配多个值。 I know multiple values can also be assigned using multiple select or drop-down input type.
我知道也可以使用多个选择或下拉输入类型来分配多个值。 But values that can be assigned to our attribute run into thousands so multiple select is not practical.
但是可以分配给我们属性的值会成千上万,因此多选是不切实际的。 Is there any way through which I can assign values through a text field which are then stored in a list or array which can be manipulated individually.?
有什么方法可以通过文本字段分配值,然后将其存储在可以单独操作的列表或数组中?
Without gaining more information about the specifics of what you want to do, here's a few options: 在不获取有关您想要做的细节的更多信息的情况下,这里有一些选择:
$var = explode(',' $this->getAttributeName())
call on it to get a non-associative array of the values $var = explode(',' $this->getAttributeName())
来获取值的非关联数组
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.