Skip Navigation

[Resolved] How to sort view by Woocommece Bookings

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to sort view by Woocommece Bookings field _booking_start date

Solution:
You can activate the third party hidden custom fields from:
=> Toolset => Settings => Front-end content => Hidden custom fields section

Once you activate it, later you can use those with the views. I activated the field _booking_start that holds the start date/time value and later I used with ordering section of views.

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/how-to-sort-view-by-custom-shortcode-value/#post-1203693

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/using-third-party-hidden-fields/

This support ticket is created 5 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Amin 5 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1195793

I have a view that displays information from Woocommece Bookings. I want to sort by one of the hidden custom fields (Start Date) that I can see in the database, but not in Types.

Is there a way for me to add the hidden field (start date) into types so that it can be used in the View for sorting?

If not, can I sort the view another way by the start date?

Thanks in advance.

#1195826

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you tell me how the date is stored in the database? Can I have screenshot of that?

#1196087

Hi Minesh, here's a link to the screenshot. Does this help?

hidden link

#1196552

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - it looks like the date is saved as date string, not as a timestamp which is used by Types date custom field to store the date value.

If you can share problem URL where you want to display the sorted results and access details I will look into this issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1203693

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now: hidden link

You can activate the third party hidden custom fields from:
=> Toolset => Settings => Front-end content => Hidden custom fields section

Once you activate it, later you can use those with the views. I activated the field _booking_start that holds the start date/time value and later I used with ordering section of views.

More info:
=> https://toolset.com/documentation/user-guides/using-third-party-hidden-fields/

Can you please confirm it works as expected.

#1203841

My issue is resolved now. Thank you!