• Resolved wordmax

    (@wordmax)


    Hi,

    One of attributes we created for user to enter when creating listing is “year” for the year of vehicle made. So we have make, model and year. This is standard information for a car classifieds site.

    For the Year field (both frontend, backend, and search filters) we do no want commas to be used because obviously this is wrong an not applicable to mfg. year made. We do not want to search for 1,967 Chevy Corvette but rather a 1967 Chevy Corvette. Same goes with the search filter we don’t want commas anywhere the year of vehicle is used.

    The attribute type we used was ‘number’ and we want it to be a searchable/filterable range value so that users can filter/search vehicle for year range like 1960 to 1975 for example.

    Did we miss something here? Are we using the wrong attribute type for vehicle years? This all seems simple in theory but it’s not obvious what’s we’re doing wrong and what the solution is via documentation, forum, etc.

    Please advise,
    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,
    I am facing the same problem right now. I’m also creating a car listing website and trying to remove commas from year numbers. As I see, your problem is solved, so maybe you could share your solution? It would be truly helpful.
    Thanks!

    Plugin Author HivePress

    (@hivepress)

    Please try following the suggestions from this topic https://community.hivepress.io/t/how-to-hide-commas-for-numbers-attribute-on-listing/30/4 There’s a workaround if you use a Text type with Regex restriction, but we’ll also consider adding an option for the Number type to disable formatting.

    Hi,
    thank you for your solution. It kinda helps, but by changing number to text, I loose option of filtering by range, which is crucial in my situation. Is there a chance for a different way to solve it?
    Thank you for your help.

    Plugin Author HivePress

    (@hivepress)

    You can try to set the Edit type to Text, but leave the Search type to Number Range, this should be ok since the stored value is a number anyway.

    Sadly, I’ve already tried this solution. It actually shows me year range (from smallest to biggest possible), which is good, but as soon, as I press filter, it claims that there are no such listings (with any range I choose).

    Thread Starter wordmax

    (@wordmax)

    Hi Hivepress devs: This year range find/filter is going to be recurring pain-point for first time admin users who are already spending a deal of time getting their site up and running. If they run into this issue (which is going to be a common use of hivepress vehicle classifieds listings) it can be the kind of a deal breaker that causes frustration and abandonment of the new project.

    I would recommend getting your dev team together and finding a user friendly admin UI solution to make it easy to add year searches and filters for items that does not conflict with text or other search filter items and does not require a finicky work-around by the classified admin user to get a user friendly year range search/filter going.

    Hope this makes good sense and I think other users will agree.
    Thank you

    Plugin Author HivePress

    (@hivepress)

    @shapovalovwp Please make sure that there are no other filters that may affect the search results, we use the same filter here and it seems to be ok https://jobhive.hivepress.io/companies/

    @wordmax Thanks for your feedback, we’ll try to add more attribute options and improve the UX. We’re working to improve HivePress 24/7 – the initial version offered just a few attribute types.

    Ok, now it’s solved. As I said, I actually tried your solution before and it didn’t work. Filters were right, it just didn’t. It started working when I changed this attribute slug name, which was “year”, to a different one.
    Anyway, thank you for you support!

    • This reply was modified 2 years, 4 months ago by shapovalovwp.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove commas in attribute (number) fields as needed?’ is closed to new replies.