jquery - Add custom property in attributes magento -
in magento, in page product, have products , can filters them. display 10 filters , want show 5 , hide 5, can in jquery .show()/.hide(). display not problem, th problem how can know if filter visible or not.
i think need add together custom property attributes, don't know how ?
not exclusively sure asking, if want give product new attribute, first
go catalog - attributes - manage attributes. click "add new attribute" fill in details type of attribute want. want dropdown values of "show" , "hide" for sake of example, assume have filled in attribute code "newattribute"now, can add together products
go catalog - attributes - manage attributes sets , clicking product type want add together to drag , drop new attribute "unassigned attributes" area list of used attributes click "save attribute set"your new fields appear when add together product.
to retrieve info in template, should utilize function along lines of
$_newattribute=$_product->getnewattribute();
newattribute name of attribute's code.
( note $_product object have have been defined first - should have been on page displaying product )
alternatively, if mean want utilize jquery know if visible or not, there solution here: jquery observe if element visible
jquery magento
No comments:
Post a Comment