简体   繁体   中英

Filter products in Magento by default weight attribute for Layered Navigation

I have set up Layered Navigation for filtering products in Magento. To set an attribute as filterable, I have checked 'Show in Layered Nav' and 'Filterable with Results' in the admin area. However, these settings are not available for default weight attribute.

I am planning to create a custom weight attribute to make it filterable. It will be a select attribute as the products will have a fixed set of weights to which they will belong. The only issue with this is that the client will have to enter the weight in two places.

Is there a way to achieve filtering by weight using the default weight attribute OR Should I proceed with creating a custom attribute?

Is there a way to achieve filtering by weight using the default weight attribute ? - No,

As the weight attribute by default is text input field type and to use attribute in layered navigation it should be a dropdown & further should be set filterable with results and use as layered navigation . And you can't change the default weight attribute/even other already saved attribute field type. So it's not possible with default weight attribute.

So basically, you would have to create another custom weight attribute which i would suggest you to create in range range. (by saying Fixed set of weight i guess you mean same). I would suggest you to call it Weight range as attribute label. And finally to confusion of attribute redundancy go to attribute set and manage both weight and weight range at same place and that would be good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM