• Resolved dhrf

    (@dhrf)


    Is there any way I can make your plugin not update pricing? It calculates it incorrectly when woocommerce product addons & woocommerce dynamic pricing is used. I am just using the swatches, I don’t need any pricing as it doesn’t work properly.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    you can hide PPOM price table with little CSS.

    Thread Starter dhrf

    (@dhrf)

    I don’t need to hide the PPOM table. In my cart the discount is being calculated twice, which results in the price being incorrect. I don’t change the price of any items using PPOM so there is no reason it should be changing the prices. Is there any way I can disable this?

    Thanks.

    Try adding this to your theme’s functions.php file:

    
    /* Remove PPOM Javascript price calculation */
    wp_dequeue_script( 'ppom-price' );
    
    /* Prevent PPOM from updating product prices */
    remove_filter ( 'woocommerce_get_cart_item_from_session', 'ppom_price_controller', 10 );
    remove_action( 'woocommerce_cart_calculate_fees', 'ppom_price_cart_fee' );
    remove_action( 'woocommerce_cart_loaded_from_session', 'ppom_calculate_totals_from_session');
    

    There may be more involved on the server-side calculations but I think this should do the trick. @nmedia should know all the proper filters / actions to disable in case I missed something.

    Thread Starter dhrf

    (@dhrf)

    @brozra Thanks for the reply, I tried that but it didn’t work.

    Sorry that didn’t work. It was just a guess. I haven’t looked too closely into disabling the price calculations for PPOM. Clearly there is more to it than just that one filter and two actions.

    From what I can tell, your best bet is to add custom fields for the swatches without the PPOM plugin. The PPOM plugin is heavily involved in changing product price, quantity, fees and many other items on the server-side.

    You could try using WooCommerce variations for your swatches (if it doesn’t interfere with WooCommerce dynamic pricing) or hard code your own custom fields script into your theme.

    Thread Starter dhrf

    (@dhrf)

    @brozra No problem, I appreciate the input. PPOM was actually working fine with dynamic pricing before we added product addons. It seems to confuse those addons with it’s own and is calculating a second time, why I was hoping I could simply disable the calculations. I can add color swatches through product addons also, I just prefer PPOM for swatches.

    I see. WooCommerce product addons and PPOM are very similar in that they reference many of the same hooks and filters.

    Seems like you have a plan of action now. Good luck getting it to work to your liking.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable price calculations?’ is closed to new replies.