开发者

Magento attribute

开发者 https://www.devze.com 2023-03-12 19:00 出处:网络
I am wondering if it is possible to have a \"display name\" AND an value in a magento attribute. At this stage as far as I can see the \"display name\" is the value that magento will use.

I am wondering if it is possible to have a "display name" AND an value in a magento attribute. At this stage as far as I can see the "display name" is the value that magento will use.

I am using e2mpro to list products from 开发者_开发技巧magento and want to be able to use an attribute for the store category in the list. With upto 300 numbers available I want to be able to associate a number with an easy to read display name. ie: 10020 -- Fiction: Scifi


Depends of your setting how you want to display your attribute.

You can create a new attribute with your own preferences:

Log into admin => Catalog => Manage attributes => New attribute

"display name" in Magento you will find under Manage Label/options=> Manage Titles (Size, Color, etc.)

"value " under Properties (Catalog Input Type for Store Owner depends of your preferences you can select "Text field" "Text area" "Dropdown" etc....)


Magento attributes by nature have a display name, a code, and a value. The value could be a boolean (1/0, true/false, yes/no, etc), text, or a number. I did a quick google search for Magento Attribute Value and this page seems to have most of what you're looking for. I hope this answers your question.


Yes you can, you'll have to create the attribute and next call it on your phtml file. Example

 $material = $product->getResource()
                     ->getAttribute('material')
                     ->getFrontend()
                     ->getValue($product);
 echo $material;

 $materialLabel = $product->getResource()
                     ->getAttribute('material_label')
                     ->getFrontend()
                     ->getLabel($product);
 echo $materialLabel;

You can also check this post I wrote

0

精彩评论

暂无评论...
验证码 换一张
取 消