After applying this plugin, the price range gets replaced with variation price as it should. But now visible in two places. How do I disable it to show in only one place. I have attached the link of the product page you can check. The variation price is visible below tittle as well as above the add to cart page. I want to show only below tittle.
]]>Is it compatible with 5.0?
]]>I don’t seem to get this plugin to work when I create a product page template neither in UX Builder or Elementor Pro.
Any help are more than welcome!
Hi!
How can I translate the word “From:” into another language? I don’t want to change the code so that the plugin update won’t remove my changes.
Hello
Thank you for your plugin
According to my theme, this change should occur in the product sidebar
But this sidebar has its own code. And I don’t know programming
Can you help me to adjust the plugin?
In fact, this is how it should be
https://pasteboard.co/JctbdDa.png
//my product url
bit.ly/2UtxVUI
//sidebar-product.php code
https://txt.do/1hti2
//single-product-demo1.php code
https://txt.do/1htin
First of all, thank you for your contribution to the community.
Currently “Out of stock” is lost, how can “Out of stock” be expressed?
]]>I love this plugin but since I’m using elementor, it’s not working… Is there any way to start working with elementor? Thanks
]]>Hola!
Al activar el código aparece duplicado en la parte superior de la página el precio y la disponibilidad.
Cómo se puede resolver?
Gracias.,
Hi,
When I activate this plugin, I’m able to see 2 price amount. How do I remove the top price amount?
Link: https://ibb.co/BGv1PWk
]]>Hello,
I am having an issue: if I select a variation, price range nicely changes to the actual price. But before doing so, for a milisecond I can see “From: price”. Which is not nice.
Can you please help me remove it somehow?
I see this topic is not very active, but i am hopefuly someone will be bale to help me.
thanks in advance!
Hi,
The plugin is working on the single product page, but how can I modify it to make the price range on shop page turn into “From XXX” as well?
]]>// Utility function to get the default variation (if it exist)
function get_default_variation( $product ){
$attributes_count = count($product->get_variation_attributes());
$default_attributes = $product->get_default_attributes();
// If no default variation exist we exit
if( $attributes_count != count($default_attributes) )
return false;
// Loop through available variations
foreach( $product->get_available_variations() as $variation ){
$found = true;
// Loop through variation attributes
foreach( $variation['attributes'] as $key => $value ){
$taxonomy = str_replace( 'attribute_', '', $key );
// Searching for a matching variation as default
if( isset($default_attributes[$taxonomy]) && $default_attributes[$taxonomy] != $value ){
$found = false;
break;
}
}
// If we get the default variation
if( $found ) {
$default_variaton = $variation;
break;
}
// If not we continue
else {
continue;
}
}
return isset($default_variaton) ? $default_variaton : false;
}
add_action( 'woocommerce_before_single_product', 'move_variations_single_price', 1 );
function move_variations_single_price(){
global $product, $post;
if ( $product->is_type( 'variable' ) ) {
// removing the variations price for variable products
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
// Change location and inserting back the variations price
add_action( 'woocommerce_single_product_summary', 'replace_variation_single_price', 10 );
}
}
function replace_variation_single_price(){
global $product;
// Main Price
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
$active_price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
// Sale Price
$prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );
sort( $prices );
$regular_price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
if ( $active_price !== $regular_price && $product->is_on_sale() ) {
$price = '<del>' . $regular_price . $product->get_price_suffix() . '</del> <ins>' . $active_price . $product->get_price_suffix() . '</ins>';
} else {
$price = $regular_price;
}
// When a default variation is set for the variable product
if( get_default_variation( $product ) ) {
$default_variaton = get_default_variation( $product );
if( ! empty($default_variaton['price_html']) ){
$price_html = $default_variaton['price_html'];
} else {
if ( ! $product->is_on_sale() )
$price_html = $price = wc_price($default_variaton['display_price']);
else
$price_html = $price;
}
$availiability = $default_variaton['availability_html'];
} else {
$price_html = $price;
$availiability = '';
}
// Styles ?>
<style>
div.woocommerce-variation-price,
div.woocommerce-variation-availability,
div.hidden-variable-price {
height: 0px !important;
overflow:hidden;
position:relative;
line-height: 0px !important;
font-size: 0% !important;
}
</style>
<?php // Jquery ?>
<script>
jQuery(document).ready(function($) {
var a = 'div.wc-availability', p = 'p.price';
$('input.variation_id').change( function(){
if( '' != $('input.variation_id').val() ){
if($(a).html() != '' ) $(a).html('');
$(p).html($('div.woocommerce-variation-price > span.price').html());
$(a).html($('div.woocommerce-variation-availability').html());
} else {
if($(a).html() != '' ) $(a).html('');
$(p).html($('div.hidden-variable-price').html());
}
});
});
</script>
<?php
echo '<p class="price">'.$price_html.'</p>
<div class="wc-availability">'.$availiability.'</div>
<div class="hidden-variable-price" >'.$price.'</div>';
}
]]>
Hi There
This plugin not support elementor pro custom single product page..
]]>Hi
This is not working with WooCommerce 3.8.0 and StoreFront at all.
Well, it’s only working somewhat.
When setting a default variation, it ignores the actual variation’s price and shows the lowest price of all the variations.
When selecting a variation, the price will not update unless you click somewhere else on the page or select a new variation.
Any help or update to these problems would be greatly appreciated.
]]>Hello
I want to use this good plugin
but The plugin don’t work at my site
demo:
https://cutt.ly/GenP1QY
I think the problem is in the add-to-cart widget in single product
Do you kindly help me
Hi,
Thanks for developing this neat plugin!
It appears also to change position of the stock status / number in stock to above the add to cart button – and for variable products the size of stock status indication increases. Any thoughts on this?
Thanks!
Tommy R?nningsveen
Sceenshoot
Please so solution because it not looking professional
Thank you
Prateek
It is a great plugin, i have one question: Is it possible to have a single price (The minimum) shown in the archives and category pages
]]>Plugin Is Not Working After Woocommerce Update, Price Range Is Showing Like This $$$-$$$ , Please Look Into It Thank You!
]]>The plugin doesn’t work at my site. The price range is still there!
do i something wrong?
]]>