Hi,
Thank you for reaching out.
We would like to let you know that our plugin does not update the prices in the backend (Sale price for discounts).
Our plugin applies discount on the fly dynamically while adding the product to cart. However, it doesn’t change the price in the back-end.
To get discount of a product, you can give a try using this snippet.
https://gist.github.com/AshlinRejo/c37a155a42c0e30beafbbad183f0c4e8
Kindly check with your developer on how you can use this snippet in your site.
Hope this helps!
Thanks
Team Flycart
my developer is out of reach now
so can you just tell me what should I replace $product->get_price()); to receive the price that your plugin returns?
thanks
Hi,
Thanks for the reply.
The above snippet helps you to get a discount on a specific product.
While creating a feed you might have to add this event to get the discount value.
If there is no discount it will return false.
Example:
$sale_price = $product->get_sale_price();//sale price or final price
$discount = apply_filters(‘advanced_woo_discount_rules_get_product_discount_price_from_custom_price’, 10, $product, 1, $sale_price, ‘discounted_price’, true, true);
if($discount !== false){
//$discount -> Here we get discount amount
$sale_price = $discount;
}
We recommend you to forward this to your developer.
Hope this helps!
Thanks
Team Flycart