• Resolved tatutre

    (@tatutre)


    Hi,

    With the version 1.25 the countdown notice was placed to positions where it made in my opinion sense when used with shop banners and sliders. Check the current site running the cart stock reducer v1.25 https://rekki.fi

    Now after the update to v1.5 the placement is before sliders and banners which doesn’t look as nice. Also, I don’t think the notice is needed on homepage and in the blog area. What would be the proper way to move the notice text back to previous position? Would I break something if I changed the code:

    in v1.5 add_action( 'wp', array( $this, 'check_cart_items' ), 10 );

    to

    add_action( 'woocommerce_before_main_content', array( $this, 'check_cart_items' ), 10 );

    Or should I rather go and edit the theme files to change the notice location for the countdown texts?

    At minimum, it would be great hate the option to disable the notice from pages other than shop related.

    https://www.ads-software.com/plugins/woocommerce-cart-stock-reducer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author James Golovich

    (@jamesgol)

    The plugin doesn’t actually display the notices, it just inserts them into the WooCommerce notice queue.

    The ‘woocommerce_before_main_content’ action is something that might not exist on every theme, though it does in the official WooCommerce themes and ones that are well supported. In order to be more flexible, I decided to have the action called on every page load.

    I’m actually surprised it makes a difference when the notices are added in how they are displayed, I’ll take a look at the code when I get a chance.

    Plugin Author James Golovich

    (@jamesgol)

    I went through a number of scenarios and while I wanted to limit the number of actions added, it seemed like the best scenario to remain flexible.

    I’ve updated the version so now the check happens on specific actions that should be called on every page it should be displayed on.

    Please, let me know how this works for you

    Thread Starter tatutre

    (@tatutre)

    Thanks, James! I already updated it to the live version rekki.fi and seems to be working perfectly. Not too intrusive yet noticeable for the customer browsing the store while having some products in the cart. A+ work!

    Maybe for future consideration: having the countdown timer visible in the mini-cart or in the mini-cart text link which shows the number of products and subtotal. So the link would be something like “Cart / xx.xx € (expiring in: or [timer icon] 1:12:12) [cart icon with product quantity]”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Moving the countdown notice back to previous place’ is closed to new replies.