Comments 3natah started the conversationApril 20, 2022 at 3:43pmHi! i found this code /**https://businessbloomer.com/bloomer-armada/*/ add_action( 'woocommerce_variable_add_to_cart', 'bbloomer_update_price_with_variation_price' ); function bbloomer_update_price_with_variation_price() { global $product; $price = $product->get_price_html(); wc_enqueue_js( " $(document).on('found_variation', 'form.cart', function( event, variation ) { $('.summary > p.price').html(variation.price_html); $('.woocommerce-variation-price').hide(); }); $(document).on('hide_variation', 'form.cart', function( event, variation ) { $('.summary > p.price').html('" . $price . "'); }); " );} at shop page and product page is working but at the quick view your theme has the range at top and the active variable price is down. I want the price range to be replaced by the active variable price please advice me ho to fix that. thanks in advance 1,877Judith repliedApril 20, 2022 at 4:47pmHi Natah,Thanks for keeping in touch.Please allow me to escalate this to the developer to assist further.Thanks. 1,070ThemeNectar repliedApril 20, 2022 at 7:41pmHey Natah, You'll need another script to handle the quick view modal, as there is different considerations when dealing with content loaded asynchronously. Keep you other snippet active and also add the following to your child theme functions.php file: add_action( 'wp_footer', 'salient_update_price_with_variation_price' ); function salient_update_price_with_variation_price() { wc_enqueue_js( " $(document).on('found_variation', 'form.cart', function( event, variation ) { var clone = $('.nectar-quick-view-box div.product .summary p.price').clone(); $('.nectar-quick-view-box div.product .summary p.price').addClass('original').hide(); $('.nectar-quick-view-box .woocommerce-variation-price').hide(); clone.addClass('clone').html(variation.price_html).insertAfter('.nectar-quick-view-box .product_title'); }); $(document).on('hide_variation', 'form.cart', function( event, variation ) { $('.nectar-quick-view-box div.product .summary p.original').show(); $('.nectar-quick-view-box div.product .summary p.clone').remove(); }); " ); } Cheers Sign in to reply ...
Hi!
i found this code
/**https://businessbloomer.com/bloomer-armada/*/
add_action( 'woocommerce_variable_add_to_cart', 'bbloomer_update_price_with_variation_price' );
function bbloomer_update_price_with_variation_price() {
global $product;
$price = $product->get_price_html();
wc_enqueue_js( "
$(document).on('found_variation', 'form.cart', function( event, variation ) {
$('.summary > p.price').html(variation.price_html);
$('.woocommerce-variation-price').hide();
});
$(document).on('hide_variation', 'form.cart', function( event, variation ) {
$('.summary > p.price').html('" . $price . "');
});
" );
}
at shop page and product page is working
but at the quick view your theme has the range at top and the active variable price is down.
I want the price range to be replaced by the active variable price
please advice me ho to fix that.
thanks in advance
Hi Natah,
Thanks for keeping in touch.
Please allow me to escalate this to the developer to assist further.
Thanks.
Hey Natah,
You'll need another script to handle the quick view modal, as there is different considerations when dealing with content loaded asynchronously. Keep you other snippet active and also add the following to your child theme functions.php file:
Cheers