• Resolved dej888

    (@dej888)


    Great work on the plugin! I have been searching for this for quite sometime and finally stumbled across it 🙂

    Question about general functionality.

    We are a shop who accepts ordering during the week at specified hours, 9am-12pm and 4pm-10pm, Monday – Friday.

    I use woocommerce to sell our products. How can I only show our products at the specified times and hide them when we are not open?

    and when the items are hiding, can you replace the hidden products with other content to show? (like we are currently closed)

    Thanks!

    https://wordpress.org/plugins/shortcodes-to-show-or-hide-content/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dave Clements

    (@thewanderingbrit)

    1) Wouldn’t this mean effectively closing your entire online store for those other hours? If so, this plugin isn’t the solution for that. However, with that said, in response to your other questions, currently you would have to create another shortcode which displays at all other times to show your “We’re closed” message, but there was recently a suggestion to allow you to set an attribute for what to display when the content is not being shown.

    Thread Starter dej888

    (@dej888)

    Hi Dave,

    I believe this is the right plugin. After reading another user using the plugin for there woocommerce store, it seems that it is the match for me.

    I only need to close our store certain hours Monday – Friday, saturday and closed all sunday.

    We use woocommerce for ordering and I would like to hide our products so customers can not order during off hours, and show replacement text or image when the products are hiding.

    I see there a lot of shortcodes, from the looks of it I see you can set individual days and times to show/hide for each day and different hours during the day?

    On your note for another shortcode, can you elaborate on this.

    In addition, to the suggestion, can you touch in more on this note and whats planned?

    Thank Dave!

    Thread Starter dej888

    (@dej888)

    Just to add to a new question to the above ones.

    I created this one below for my site to hide/show, however the -2, -3, -4, -5 repeats are not working. Can you please assist on the problem here? From the example:

    [time-restrict-repeat type=”daily” ontime=”08:00:00″ offtime=”17:00:00″]
    [time-restrict-repeat-2 type=”weekly” onday=”Monday” offday=”Friday”]
    Our store is currently open
    [/time-restrict-repeat-2]
    [/time-restrict-repeat]

    I used this as mine and I get errors on the repeats:

    [time-restrict-repeat type=”weekly” onday=”Monday” offday=”Friday” ontime=”00:00:30″ offtime=”10:58.00″]
    [time-restrict-repeat-2 type=”weekly” onday=”Monday” offday=”Friday” ontime=”13:55:00″ offtime=”16:00:00″]
    [time-restrict-repeat-3 type=”weekly” onday=”Monday” offday=”Friday” ontime=”20:00:00″ offtime=”23:59:59″]
    [time-restrict-repeat-4 type=”weekly” onday=”Saturday” offday=”Saturday” ontime=”00:00:30″ offtime=”11:00:00″]
    [time-restrict-repeat-5 type=”weekly” onday=”Sunday” offday=”Sunday” ontime=”00:00:30″ offtime=”23:59:59″]
    [woocommerce_cart]
    [/time-restrict-repeat]
    [/time-restrict-repeat-2]
    [/time-restrict-repeat-3]
    [/time-restrict-repeat-4]
    [/time-restrict-repeat-5]

    sanjaisc

    (@sanjaisc)

    Hi dej888,

    You can achieve the solution for Woo Commerce by doing the following:

    • Leave the shop page as it is, so that people can browse the shop even when closed.
    • Restrict access to shopping cart and checkout pages during the closed hours so that people do not place orders.
    • Display a message during closed hours, if people try to place an order, with your shop timings and ask the visitor to come back later.

    As an example you can use the following code.

    • People will be able to place orders Monday to Friday between 8:00 am and 5:00 pm
    • Between 5:01 pm and 7:59 am people will be able to browse your shop but if they try to place orders they will see a message with the shop timmings

    Of-course you need to use the same code on the checkout page!

    SAMPLE CODE

    [time-restrict-repeat type=”weekly” onday=”Monday” offday=”Friday”]
    [time-restrict-repeat-2 type=”daily” ontime=”08:00:00″ offtime=”17:00:00″]
    [woocommerce_cart]
    [/time-restrict-repeat-2]
    [time-restrict-repeat-3 type=”daily” ontime=”17:00:01″ offtime=”07:59:59″]
    <p style=”text-align: center;”>Sorry we are unable to take your order at this time as we are closed. Our business hours are:</p>
    <p style=”text-align: center;”>Mon – Fri : 8 am – 5 pm</p>
    <p style=”text-align: center;”>Please come back later.</p>
    [/time-restrict-repeat-3]
    [/time-restrict-repeat]

    Hope this solves your problem.

    sanjaisc

    (@sanjaisc)

    Hi Dave,

    I have a quick question of my own. The nested short code works fine with -2 and -3 as additions to the second and third level nested code (see my response to a user query above). However I have a situation where I have used -2, -3 and -4. The -4 sequence does not work!

    Is there a restriction on the number of short codes that can be nested? I need to nest 3 levels, is there a work around?

    Thanks in advance for your assistance.

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Yes, currently, there is only support for three nested levels. I can add more, but can’t think of a situation where another level would be needed. Perhaps you can elaborate?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide WooCommerce Products’ is closed to new replies.