Hi,
Sorry, prices are controlled via JS on fron-end and we cannot add hook for this.
Ok, thank you, i middle solved
in ppom-price.js
// Here multiply by select_number
// line 235 of ppom-price.js
if ( jQuery(‘#select_number’).length ) {
option_price_with_qty = option_price_with_qty * jQuery(‘#select_number’).val();
}
but not add to cart changes
-
This reply was modified 4 years, 11 months ago by nativa1.
-
This reply was modified 4 years, 11 months ago by nativa1.
Please, i need send to cart the new total update
What is the variable?
Where is the variable?
Where parsed?
and I program it
Well here is filter we have when updating cart line item, it may help you:
apply_filters('ppom_cart_line_total', $cart_line_total, $cart_items, $values);
Thank you very much for the clue,
I full solved !!
// line 460 of woocommerce.php
$ppom_meta = ppom_make_meta_data( $cart_items, $context="cart" );
foreach( $ppom_meta as $key => $meta ) {
//echo $item->get_id();
//echo $key." ".$meta['value'];
if($key=='select_number'){
$total_option_price = $total_option_price * $meta['value'];
}
//$item->update_meta_data($key, $meta['value']);
}
$cart_line_total = ($ppom_item_org_price + $total_option_price + $ppom_quantities_price - $ppom_total_discount);
$cart_line_total=apply_filters('ppom_cart_line_total', $cart_line_total, $cart_items, $values);
Cheers.
If you love our plugin and support please rate us 🙂