Skip Navigation

[Resolved] Restrict buy button to specific hour ranges

This support ticket is created 4 years, 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

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

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Pat 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1356949

Pat

Hello,

I have a site with Toolset and WC and would like to restrict the "Buy button" of the product page to specific hours ranges (ie from 10am to 2pm and from 5.30pm to 10.30pm)

Is there a way to do this thanks to access or with specific code?

Regards
Pat

#1357235

Shane
Supporter

Languages: English (English )

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

Hi Pat,

Thank you for getting in touch.

Unfortunately this is not something that is possible with our plugins.

You will need to achieve this with a 3rd party plugin.

Please try the plugin below and let me know if it helps.
https://wordpress.org/plugins/order-hours-scheduler-for-woocommerce/

Thanks,
Shane

#1357319

Pat

Hi Shane,

Thanks for the info.
I've just tested the plugin and it works ... only if you use the Woocommerce product template. If you use a Toolset product template, then, the hour function does not work !

Any idea?
Regards
Pat

#1357345

Shane
Supporter

Languages: English (English )

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

Hi Pat,

In this case you will need to create a completely custom shortcode or some form of custom code in order to implement this with the custom templates.

Unfortunately such a custom code would be out of the scope of our support form. So I would recommend that you would contact one of the registered contractors in order to get this custom code done for you.
https://toolset.com/contractors/

Thanks,
Shane

#1357383

Pat

Hi Shane,

I'm still asking myself why Toolset shortcode that I have integrated inside the Toolset template is not able to manage the same way than the WC template !!!

Is there a difference in the "add to cart" shortcode Toolset is proposing compared to the way the button is manage inside WC?

Regards
Pat

#1357385

Shane
Supporter

Languages: English (English )

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

Hi Pat,

As mentioned here https://toolset.com/forums/topic/restrict-buy-button-to-specific-hour-ranges/#post-1357235

There is no guarantee that this would work since it is a 3rd party plugin that i did a quick check to see if a solution existed. I suspect that the plugin hooks in the default templates and is not able to recognize custom templates.

Though all our Toolset shortcodes do is pull the default HTML for generating the button from woocommerce so that it can be placed in a different position on the page.

Our plugin makes no modification to the default structure of the button itself, however the plugin might be expecting the default template.

I hope I was able to clarify this one for you.

Thanks,
Shane

#1357609

Pat

Hi Shane,

Understood.
I'm still thinking that this kind of feature should be integrated in the future inside Toolset Access (ie : extending the access management to not only roles but also timing ...).
Regard
Pat

#1357973

Shane
Supporter

Languages: English (English )

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

Hi Pat,

I see what you mean, so to have content time locked or something of the sort.

What you can do is to open a feature request for this, explaining in details the feature so our development team can have a look.
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

Thanks,
Shane

#1359547

Pat

Hi Shane,

I have create d anew feature request today.
Thanks
Pat

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.