Home › Forums › WoodMart support forum › Woodmart Filter
Woodmart Filter
- This topic has 1 reply, 2 voices, and was last updated 1 week, 1 day ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
April 7, 2025 at 6:02 pm #652271
nexoraretailParticipantin my woocommerce store i have a lot of products which have variations. as i am selling insurance products on my woocommerce store, I have a attribute name “Device Price” in which the values are like ‘0-5000’ , ‘5001-10000’ , ‘10001-20000’ , ‘20001-22000’ , ‘22001-27000’ and many more. the values are like a number range for example lets take the value ‘5001-10000’ so in this 5001 is the minimum value and 10000 is the maximum value. the values are different for different products. So on shop page their is an attribute variation selector filter. it is a dropdown selector in which all the “Device Price” attribute values are there and customer can select any one value and then selected variation product will be shown. but i want some modifications on the shop page or on any page where i will place the woodmart ‘filter by attribute’ filter’ of “Device Price”.
i wanted to convert the dropdown selector field of woodmart ‘filter by attribute’ filter’ of “Device Price” Attribute into a Number Field in which customer will type a number and then the range in which the number comes in between that attribute will be automatically selected. For example if a product has values ‘0-10001’ , ‘10001-20000’ , ‘20001-30000’ , ‘30001-35000’ in the “Device Price” attribute field and if a customer enters a number for example ‘28000’ so automatically the value ‘20001-30000’ should be selected as ‘28000’ falls in between the range ‘20001-30000’. but remember different products have different ranges value in “device price” attribute for example the product ‘mobile phone insurance plan’ have ranges ‘0-25000’ , ‘25001-50000’ , ‘50001-60000’ , ‘60001-75000’ and the product ‘television insurance plan’ have ranges ‘0-15000’ , ‘15001-25000’ , ‘25001-45000’ , ‘45001-55000’ , ‘55001-75000’ and more. So if for example a person enters a price ‘52000’ so i want the filter to automatically select attribute value of that range in which ‘52000’ falls which will be different for different product for example in the above example customer has entered price ‘52000’ so for product ‘mobile phone insurance plan’ the attribute ‘50001-60000’ should be automatically selected as ‘52000’ falls between the range and for the product ‘television insurance plan’ the attribute ‘45001-55000’ should be automatically selected as ‘52000’ falls between the range. all the product in which the entered value falls between the ranges have range attribute in “device price” should be shown. so can you give me the code for this feature.i want code to convert the existing woodmart “filter by attribute” filter for attribute named “device price” into a number input box.
and also i wanted the filter to automatically select the variation Attribute of range value in which the number entered falls for all the products which are in filtered results.
I also asked this to chatgpt to give me the code. Chatgpt gave me a Javascript code which was only showing a numeric input field above the existing woodmart “Filter by attribute” filter of attribute named “Device Price”. and when i entered any number in it then the code was just adding “?filter_device-price=” in the URL but not actually filtering the correct value.
Please help and give me a Code for this functionality as i am a very old Client of woodmart theme. I have total three Licenses of woodmart theme and have also recommended it to my friends.
I have attached the photo of the Filter i want to convert. Thank You.
Attachments:
You must be logged in to view attached files.April 8, 2025 at 11:15 am #652433
Aizaz Imtiaz AwanKeymasterHello,
Sorry, but there is no option in Theme Settings available for that.
It requires customizations, and this is beyond our limitations and support policy.
Best Regards,
-
AuthorPosts
Tagged: filter
- You must be logged in to create new topics. Login / Register