I am having issue with the display of the currency on cellphone
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Pablo Borysenco on May 4, 2023, 12:17Hello
Ok! I disabled this plugin - https://c2n.me/4is1a3V.png - Please do a test
And it looks like you are using a custom price display template
Hello
Ok! I disabled this plugin - https://c2n.me/4is1a3V.png - Please do a test
And it looks like you are using a custom price display template
Quote from mariangio on May 4, 2023, 12:45Hi Pablo. I will try disabling that plugin.
As for the price we are not using a custom price display template but only a small code for the display of variation to be only showing the small price.
Here the code we have added below. Do you think something in that code could create the issue?
Thanks
add_filter( 'woocommerce_get_price_html', 'cssigniter_change_variable_price_display', 10, 2 );
function cssigniter_change_variable_price_display( $price, $product_obj ) {
global $product;if ( 'variable' !== $product->get_type() || 'product_variation' === $product_obj->post_type ) {
return $price;
}$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
// Translators: %s is the lowest variation price.
$price = $prices[0] !== $prices[1] ? sprintf( __( '%s', 'your-text-domain' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );return $price;
}
Hi Pablo. I will try disabling that plugin.
As for the price we are not using a custom price display template but only a small code for the display of variation to be only showing the small price.
Here the code we have added below. Do you think something in that code could create the issue?
Thanks
add_filter( 'woocommerce_get_price_html', 'cssigniter_change_variable_price_display', 10, 2 );
function cssigniter_change_variable_price_display( $price, $product_obj ) {
global $product;
if ( 'variable' !== $product->get_type() || 'product_variation' === $product_obj->post_type ) {
return $price;
}
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
// Translators: %s is the lowest variation price.
$price = $prices[0] !== $prices[1] ? sprintf( __( '%s', 'your-text-domain' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
return $price;
}
Quote from Pablo Borysenco on May 5, 2023, 09:23Hello
Do you think something in that code could create the issue? - Yes. To work correctly with the cache, prices must have such template - https://share.pluginus.net/image/i20230505101425.png
add_filter( 'woocommerce_get_price_html', 'cssigniter_change_variable_price_display', 10, 2 );
function cssigniter_change_variable_price_display( $price, $product_obj ) {
global $product;if ( 'variable' !== $product->get_type() || 'product_variation' === $product_obj->post_type ) {
return $price;
}$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
// Translators: %s is the lowest variation price.
$price = $prices[0] !== $prices[1] ? sprintf( __( '%s', 'your-text-domain' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );if (class_exists('WOOCS')) {
global $WOOCS;
$classes = "woocs_price_code";
if ($WOOCS->shop_is_cached AND $WOOCS->shop_is_cached_preloader) {
$classes .= " woocs_preloader_ajax";
}$price = '<span class="' . $classes . '" data-currency="" data-redraw-id="' . uniqid() . '" data-product-id="' . $product_obj->get_id() . '">' . $price . '</span>';
}
return $price;
}
Attention, this is sample code, I have not tested it.
Hello
Do you think something in that code could create the issue? - Yes. To work correctly with the cache, prices must have such template - https://share.pluginus.net/image/i20230505101425.png
add_filter( 'woocommerce_get_price_html', 'cssigniter_change_variable_price_display', 10, 2 );
function cssigniter_change_variable_price_display( $price, $product_obj ) {
global $product;
if ( 'variable' !== $product->get_type() || 'product_variation' === $product_obj->post_type ) {
return $price;
}
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );
// Translators: %s is the lowest variation price.
$price = $prices[0] !== $prices[1] ? sprintf( __( '%s', 'your-text-domain' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );
if (class_exists('WOOCS')) {
global $WOOCS;
$classes ="woocs_price_code";
if ($WOOCS->shop_is_cached AND $WOOCS->shop_is_cached_preloader) {
$classes .=" woocs_preloader_ajax";
}
$price = '<span class="' . $classes . '" data-currency="" data-redraw-id="' . uniqid() . '" data-product-id="' . $product_obj->get_id() . '">' . $price . '</span>';
}
return $price;
}
Attention, this is sample code, I have not tested it.
Quote from mariangio on May 5, 2023, 13:27Thanks, Seems to be working well. Thanks so much!
Thanks, Seems to be working well. Thanks so much!
Quote from Pablo Borysenco on May 8, 2023, 09:32Hello
Great! Welcome;)
Hello
Great! Welcome;)