Skip Navigation

[Resolved] integrate an availability date field from rnb plugin

This support ticket is created 5 years, 5 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 5 replies, has 3 voices.

Last updated by Waqar 5 years, 5 months ago.

Assisted by: Waqar.

Author
Posts
#1369775

Tell us what you are trying to do?
I would like to search with toolset for a date field of a woocommerce product
Is there any documentation that you are following?
I searched the documentation but I need specific support
Is there a similar example that we can see?

What is the link to your site?
hidden link

I created a view that lists the inventories of the rnb woocommerce rental & boking plugin.
I can filter many of the proprietary fields of the plugin, but I would like to have a date filter that lists only the products available for that date.
the rnb plugin manages the availability from the single product. is it possible to fitrarle with toolset?
Thanks

#1369921

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

How is the date stored?

Views is a layer built on top of the core WordPress class WP_Query and works in the same way. So, if you want to filter/search by something, then that thing needs to be a field of the thing you are searching.

So if we are talking about WooCommerce products, and a View to filter these products, you can filter by custom fields belonging to products, or taxonomies assigned to products.

If the date is a custom field of products then it should be possible to filter by it, yes, though it would help to know the format the date is stored in.

#1369949
database.jpg

in the database i have this (look the attachment)

#1370011

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Those dates are stored in custom tables which make them inaccessible to Toolset and mean that they cannot be used in normal WordPress queries (or Views).

Perhaps the plugin includes an API that can be used to query products by date?

You could possibly create a View to query products that includes a custom date control, where Views queries products—while ignoring the date—and you could then use the Views API filter wpv_filter_query_post_process to iterate over the results and somehow get the dates belonging to the products and see if they match the value provided by your custom date control.

I expect "somehow" would be using an API function that the plugin makes available, but in any case this requires a custom solution.

I could help you with the Views filter, but not with the other plugin.

#1370163

I don't know, unfortunately I'm not good with php.
the rnb plugin integrates with woocommerce and creates a new type of product: "rental"
then a woocommerce product is created and associated with an "inventory". the latter establishes costs, availability, etc. ...
where can I check if the plugin shares the API?

#1371361

Hi,

Nigel is on vacation and will back tomorrow, so I'll be following up on this ticket.

In case, you need personalized assistance around custom code, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

To get the most accurate and up-to-date information related to that plugin's supported features and API, you can consult its official support ( hidden link ) and documentation ( hidden link ).

regards,
Waqar