Problem with my theme Porto
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 Thierry on September 14, 2020, 07:40Hi,
I have installed the plugin and all is fine with my principal currency in CHF
But when I change the currence to USD, EUR or other there a message error in the front page of my product.
You can see in this link the message
And below the PHP file :
<?php
/**
* Single Product Sale Flash
*
* @version 1.6.4
*/if ( ! defined( 'ABSPATH' ) ) {
exit;
}global $post, $product, $porto_settings;
$labels = '';
if ( $porto_settings['product-hot'] ) {
$featured = $product->is_featured();
if ( $featured ) {
$labels .= '<div class="onhot">' . ( ( isset( $porto_settings['product-hot-label'] ) && $porto_settings['product-hot-label'] ) ? esc_html( $porto_settings['product-hot-label'] ) : esc_html__( 'Hot', 'porto' ) ) . '</div>';
}
}if ( $porto_settings['product-sale'] && $product->is_on_sale() ) {
$percentage = 0;
if ( $product->get_regular_price() ) {
$percentage = - round( ( ( $product->get_regular_price() - $product->get_sale_price() ) / $product->get_regular_price() ) * 100 );
}
if ( $porto_settings['product-sale-percent'] && $percentage ) {
$labels .= '<div class="onsale">' . $percentage . '%</div>';
} else {
$labels .= apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . ( ( isset( $porto_settings['product-sale-label'] ) && $porto_settings['product-sale-label'] ) ? esc_html( $porto_settings['product-sale-label'] ) : esc_html__( 'Sale', 'porto' ) ) . '</span>', $post, $product );
}
}
echo '<div class="labels">';
echo porto_filter_output( $labels );
echo '</div>';Thank you in advance for your quick help
Kind regards,
Hi,
I have installed the plugin and all is fine with my principal currency in CHF
But when I change the currence to USD, EUR or other there a message error in the front page of my product.
You can see in this link the message
And below the PHP file :
<?php
/**
* Single Product Sale Flash
*
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $post, $product, $porto_settings;
$labels = '';
if ( $porto_settings['product-hot'] ) {
$featured = $product->is_featured();
if ( $featured ) {
$labels .= '<div class="onhot">' . ( ( isset( $porto_settings['product-hot-label'] ) && $porto_settings['product-hot-label'] ) ? esc_html( $porto_settings['product-hot-label'] ) : esc_html__( 'Hot', 'porto' ) ) . '</div>';
}
}
if ( $porto_settings['product-sale'] && $product->is_on_sale() ) {
$percentage = 0;
if ( $product->get_regular_price() ) {
$percentage = - round( ( ( $product->get_regular_price() - $product->get_sale_price() ) / $product->get_regular_price() ) * 100 );
}
if ( $porto_settings['product-sale-percent'] && $percentage ) {
$labels .= '<div class="onsale">' . $percentage . '%</div>';
} else {
$labels .= apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . ( ( isset( $porto_settings['product-sale-label'] ) && $porto_settings['product-sale-label'] ) ? esc_html( $porto_settings['product-sale-label'] ) : esc_html__( 'Sale', 'porto' ) ) . '</span>', $post, $product );
}
}
echo '<div class="labels">';
echo porto_filter_output( $labels );
echo '</div>';
Thank you in advance for your quick help
Kind regards,
Quote from Thierry on September 14, 2020, 08:38Below the link for the problem message :
https://drive.google.com/file/d/1ifxfnYeLFhrMc3pRWGfdCMKURclTdnwD/view?usp=sharing
Below the link for the problem message :
https://drive.google.com/file/d/1ifxfnYeLFhrMc3pRWGfdCMKURclTdnwD/view?usp=sharing
Quote from Pablo Borysenco on September 14, 2020, 11:27Hello
Read this please - https://pluginus.net/support/topic/when-is-multiple-allowed-set-to-yes-product-discount-percentage-box-only-displays-nan/
Hello
Read this please - https://pluginus.net/support/topic/when-is-multiple-allowed-set-to-yes-product-discount-percentage-box-only-displays-nan/
Quote from Thierry on September 14, 2020, 12:17Hello,
Thank you for your answer.
I have read your correction code but could you tell where I have to add this code in the PHP file ? Have I to erase something ?
Or could you just correct the PHP code I have sent you before ?
I'm not a professionnal for website.
Thank you in advance for your support
Hello,
Thank you for your answer.
I have read your correction code but could you tell where I have to add this code in the PHP file ? Have I to erase something ?
Or could you just correct the PHP code I have sent you before ?
I'm not a professionnal for website.
Thank you in advance for your support
Quote from Pablo Borysenco on September 15, 2020, 11:30Hello
change this ( https://c2n.me/495pjnE.png ) code to :
$reg_p=floatval($product->get_regular_price());
if ( $reg_p ) {
$percentage = - round( ( ( $reg_p - $product->get_sale_price() ) / $reg_p ) * 100 );
}your google drive link is closed
Hello
change this ( https://c2n.me/495pjnE.png ) code to :
$reg_p=floatval($product->get_regular_price());
if ( $reg_p ) {
$percentage = - round( ( ( $reg_p - $product->get_sale_price() ) / $reg_p ) * 100 );
}
your google drive link is closed