• Resolved rajeshsingh520

    (@rajeshsingh520)


    Hi,

    We are facing a conflict with your oro version plugin,so i am hoping you can guide us to fix the conflict

    we are ading a product A as of 0 cost using code the product is of price 15

    but your plugin is showing it of original cost in the cart, and checkout page

    your this function get_sale_price($sale_price, $product); in class-wad-discount.php is changing the price to regular price as it has some check in it for empty($sales_price)

    
     if (empty($sale_price))
            {
                global $wad_ignore_product_prices_calculations;
                $previous_value=$wad_ignore_product_prices_calculations;
                $wad_ignore_product_prices_calculations=TRUE;
                $regular_price = $product->get_regular_price();
                $sale_price= $regular_price;
                $wad_ignore_product_prices_calculations=$previous_value;
            }
    

    can you tell us how to buypassthis filtering and get it to show the 0 price

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hermann LAHAMI

    (@mano88)

    Hello,
    That piece of code makes sure our plugin gets the prices using woocommerce functions. If you want to make our plugin see 0, I suggest you hook into the sale price or regular price retrieval functions. We don’t do any direct access to product properties to avoid these.

    Can you share the code you’re using to alter the prices?

    Thread Starter rajeshsingh520

    (@rajeshsingh520)

    Thanks for the reply, we found the fix for the issue actully we where only setting the product price 0 in sales only

    
    $product->set_price( 0 );
    $product->set_sale_price( 0 );
    

    when we also added the regular price to 0 then the issue got fixed

    
    $product->set_regular_price( 0 );
    
    Plugin Author Hermann LAHAMI

    (@mano88)

    Awesome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with plugin’ is closed to new replies.