Filter on date

  • Posts: 9
  • Thank you received: 0
10 years 2 weeks ago #178400

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

Hi,

I'm trying to get my products filtered on date. It's a list of trainings, each training has it's own date (added to the product as a custom field, simple date).
The cursor option doesn't work, I cannot slide the square along the timeline. Nor does the check in option. Only option that I have left is ordering descending or ascending. But I want people to be able to select a specific date.

Can you help me to create the select option for one specific date (chosen by the customer) or a range of dates that works? Please, step by step tutorial would be very useful :)

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 weeks ago #178403

Hi,

Using the simple date picker it won't be possible.
The simple date picker store the date in text in the database. So if you want to make some special database operations ; it will be difficult.
You can use a sort if you are using the correct format stored in the database "%Y-%m-%d". Otherwise the sort won't work properly.

By using the "advanced date picker" (if not available, you'll need to publish the associated plugin) ; it will be easier.
The advanced date picker store the timestamp in the database, so it will be easier to make some database operations.
The sort will sort by default.

But the filtering system as not been design to work with these custom fields (simple or advanced date picker).
Which means that you can have something with dynamic values (we planned to make a refactoring on the filter system but it won't be available in a short time delay).
It is possible to modify the filtering system in order to add the compatibility with he date (using the advanced date picker) ; it will require some time and some PHP/development knowledge but it's possible.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum