Using new product attribute types
Using the new product attribute types is no different from other product attributes
- After installation go to the admin menu, "Catalog > Attributes > Manage Attributes".
- Click the "Add New Attribute" button in the top right.
- The new types are available in the "Catalog Input Type for Store Owner" field. You may choose from:
- HTML Color
- HTML Email
- HTML Number
- HTML URL
- WYSIWYG Media File
- Widget
These types work just like "Text Field" in old web browsers. Supportive browsers add extra features like a spin control for numbers, or a ".com" shortcut for URLs.
The color type stores it's value in hexadecimal format like #ffffff
or #123abc
. It does not make sense to have this raw data visible on the front-end, instead a change is needed to your store's theme.
For example, say you have created an attribute brand_color
you can then apply this color to the product page. In the template/catalog/product/view.phtml
file of your theme find the following line:
<div class="product-view">
...and replace it with this:
<div class="product-view" style="background-color: <?php echo $_product->getBrandColor() ?>;">
If a widget-type attribute has the "Visible on Product View Page on Front-end" option set then it will appear in the "Additional Information" tab with other visible attributes, but it will be a fully rendered widget. This could be used to insert a common shipping or warrantee CMS static block into specific product pages without having to copy a lot of text each time.
The media file type works much like the widget type when made visible, except it helps a bit more by displaying the file in an <img>
tag. If it did not only an URL would be displayed instead.
The new attributes you create will depend on Form Elements extension. If this extension is uninstalled you must first delete those dependent attributes or some parts of your store will break.