[Closed] Filter products by years between to values of select boxes.

This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Our next available supporter will answer your ticket in about 2.57 hours from now. Thank you for your understanding.

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

This topic contains 12 replies, has 2 voices, and was last updated by  Shane 1 week, 2 days ago. The support staff assigned to this topic is Shane.

Viewing 13 posts - 1 through 13 (of 13 total)
Author
Posts
#573290

Tell us what you are trying to do?
Give users the ability to filter products between to selected years (eg. from 1999 to 2016).

Is there a similar example that we can see?
I need to do the same like here, from certain year to another..
http://www.bolding.as/produkter/referencer

What is the link to your site?
http://goldhofer.se/product-category/used/

I have tried to fill the years in each select box (from/to) by jQuery but it didn't work.

#573424

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

Thank you for contacting our support forum.

Is there a field on the post themselves that has these year fields that you are filtering for ?

Please let me know.
Thanks,
Shane

#573989

Hello Shane,

Yes, it called 'Model Year' please see attached photos..

Thanks

#574673

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

I see that everything is actually setup correctly.

Would you mind providing me with admin access so that I can have a more detailed look at this for you ?

The private fields will be enabled for your next response.

Thanks,
Shane

#575273

Hi Shane,

The private fields are not enabled!?

Thanks

#575359

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

Sorry about that the fields have been enabled now.

Thanks,
Shane

#575447

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

Thanks for the credentials.

Im currently having a look.

#575865

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

What did you use to populate the model year as I see that it was not added through the Types settings.

Thanks,
Shane

#576397

Hi Shane,

If there is anyway to do that through the Types settings, please let me know, I've spend so much time on searching, and the only solution I found is to do it dynamically through PHP (wpt_field_options).

Thanks

#576939

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

The issue with this is that since the field was not populated through types then there isn't any record of it in the database to compare to whats on the CPT.

The only other option is to manually add the values to the filters to compare to .

Thanks,
Shane

#577210

Hi Shane,

Then I'm gonna need a function to add the new year every year! is that possible?

Thanks.

#577817

Any update 🙂

#577944

Shane
Forum moderator

Supporter languages: English (English )

Supporter Timezone: America/Jamaica (GMT-05:00)

Hi Jorn,

I must apologize for the delay in response.

Unfortunately I'm not able to assist with the custom code for this, however instead of using select fields why not use a single line field and allow the user to enter the year value in an example format that you will set.

This will allow you to use a select value on the frontend to perform the search without having the manually populate all the dates yourself.

Thanks,
Shane

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘[Closed] Filter products by years between to values of select boxes.’ is closed to new replies.