Hi,
I noticed that only in one page the layout is broken and it depends on the code inserted in the function.php file can you help to understand why only in that page there is a problem?
Thanks.
This topic has 6 replies, 2 voices, and was last updated 6 days, 12 hours ago ago by Luca Rossi
Hi,
I noticed that only in one page the layout is broken and it depends on the code inserted in the function.php file can you help to understand why only in that page there is a problem?
Thanks.
send
Dear @Andrea,
We’ve changed the custom code to this and it’s working fine now:
add_action('before_etheme_product_grid_list_product_element_title', 'aggiungi_badge_spedizione_gratis_xstore', 10);
function aggiungi_badge_spedizione_gratis_xstore() {
global $product;
if ( ! $product || ! $product->is_in_stock() ) return;
// Ricarica il prodotto per sicurezza
$product_id = $product->get_id();
$product = wc_get_product($product_id);
if ( ! $product ) return;
// Prendi il prezzo netto (senza tasse)
if ( $product->is_type('variable') ) {
$price_netto = $product->get_variation_price('min', false); // prezzo netto minimo
if ( ! $price_netto ) {
$price_netto = $product->get_variation_regular_price('min', false);
}
} else {
$price_netto = $product->get_price(false); // prezzo netto
if ( ! $price_netto || $price_netto == 0 ) {
$price_netto = $product->get_regular_price(false);
}
}
// Calcola prezzo lordo (con IVA 22%)
$iva_percentuale = 22; // percentuale IVA
$price_lordo = floatval($price_netto) * (1 + $iva_percentuale / 100);
if ( floatval($price_lordo) >= 200 ) {
echo '<span class="badge-spedizione-gratis">Spedizione Gratis</span>';
}
}
Can you please have a look?
Thank you!
great it works! Thanks for your help!
Dear @Andrea,
In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?
Click here to share your thoughts: https://themeforest.net/downloads
Being part of our community means a lot, and your feedback contributes immensely.
Best Regards,
The 8Theme Team
The issue related to '‘Page error with different product category display’' has been successfully resolved, and the topic is now closed for further responses