If you like our themes and support, please SHARE our website! https://theme-sky.com/wordpress-themes/

Okay
  Public Ticket #1118252
Question about product deals
Closed

Comments

  •  2
    Hassan started the conversation

    Hello,

    We have more than 2000 products in our store so its not possible for us to go to each product and apply some discount with start and end data. So we use a plugin https://wordpress.org/plugins/woo-advanced-discounts/ which allows us to apply discounts in bulk and fulfills our need. Then our product start showing in discount for the period we set. But those products do not show in TS deal widget. I looked into code and found that product deals widget trying 

    get_post_meta($product->id, '_sale_price_dates_to', true);

    And obviously that plugin is not hardcoding setting this meta thats why its not coming in deals section. Is it possible that this ts deal widget also consider any hooks any of the plugin is adding and if any plugin trying to add sale then this widget should show the product in sale? Is it possible or is it make sense?

    Thank you.

  •  567
    Stormit replied

    Hi Hassan,

    Are you mentioning the ts_template_loop_time_deals() function? If yes, you can install my blank plugin. Then, you copy the ts_template_loop_time_deals() function and paste to my plugin. You can edit the code in the custom plugin. Because it will be loaded before the code in the woo_shortcodes.php file.

    Best regards,

  •  2
    Hassan replied

    Ok Thank you. 1 more question. Which products come in this function. Its start is

    function ts_template_loop_time_deals(){
    global $product;

    ...

    }

    But those products which i set in discount using plugin are not comming in this function $product variable. How can i make my products come in this function?

  •  2
    Hassan replied

    I think i need to modify ts_product_deals_slider_shortcode as well to include those products as well which are being discounted by the plugin.

  •  567
    Stormit replied

    Hi Hassan,

    Yes. The ts_product_deals_slider_shortcode function load products which are discounted.

    Best regards,