Add custom property in attributes magento
In magento, in my page product, I have all my products and I can filters them. I display about 10 filters and I want to show only 5 and hide 5, I can do that in jQuery with .show()/.hide(). Display is not the problem, th problem is how I can know if the filter is visible or not.
I think I need to add a custom property to attributes, but I don't know how do that ?
Not entirely sure this is what you are asking, but if you want to give a product a new attribute, you first
Now, you can add this to your products by
Your new fields will now appear when you add a product.
To retrieve this information in your template, you should use the function along the lines of
$_newattribute=$_product->getNewattribute();
Newattribute will be the name of your attribute's code.
( Note that the $_product object will have to have been defined first - it should have been so on any page displaying a product )
Alternatively, if you mean you just want to use jquery to know if something is visible or not, there is a solution here: Detect if an element is visible
链接地址: http://www.djcxy.com/p/83546.html上一篇: 如何在下拉菜单功能onclick中包含<a>标记同级?
下一篇: 在属性magento中添加自定义属性