• Resolved skolmarketing

    (@skolmarketing)


    Is it possible to show the a unique timer for each product on a shop landing page? I will have multiple products on my site and they each expire on their own specific date. I’d like to be able to show the countdown timers for each product on my Shop landing page as well as the product page itself – something like this: https://cl.ly/50db4a8f5696. Is this possible with this plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hello,
    While there is no visual settings at this time. This is something doable by adding this code snippet to your theme functions.php file:

    
    add_action('woocommerce_after_shop_loop_item_title', function(){
    	global $product;
    
    	$campaign_id = 999; // change with your campaign ID
    	if($product){
    	    $campaign = hurryt_get_campaign($campaign_id);
    	    $wc_campaign = new \Hurrytimer\WCCampaign();
    	    if($wc_campaign->has_campaign($campaign, $product->get_id())){
    			
    		echo do_shortcode(sprintf('[hurrytimer id="%d"]', $campaign_id));
    	    }
    	}
    });
    

    Let me know if that worked for you

    Best,
    Nabil

    • This reply was modified 5 years, 5 months ago by Nabil Lemsieh.
    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi,

    I’m going to mark this thread as resolved. Please feel free to reply if you still need help.

    Best,
    Nabil

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing Product Timer on Shop Landing page’ is closed to new replies.