Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Sevel HUGE and urgent problems after updating the theme.

Home / Forums / Pinnacle Theme / Sevel HUGE and urgent problems after updating the theme.

This topic is: Resolved
[Resolved]
Posted in: Pinnacle Theme
November 24, 2017 at 3:17 am

So we updated the theme (using the automatic function):

1) The sales badges stoped showing percentages and now just say: “sale”.

I have placed the following code in the childtheme, but somehow it’s not working

Here is how it looked before:

Here is how it looks now:

add_filter( 'woocommerce_sale_flash', 'kt_custom_sales_flash', 10, 2 );
function kt_custom_sales_flash() {
global $product;
if ($product->is_on_sale() && $product->product_type == 'variable') {
$available_variations = $product->get_available_variations();
$percentage = 0;
for ($i = 0; $i < count($available_variations); ++$i) {
$variation_id=$available_variations[$i]['variation_id'];
$variable_product1= new WC_Product_Variation( $variation_id );
$regular_price = $variable_product1 ->regular_price;
$sales_price = $variable_product1 ->sale_price;
$percentage_base = round( ( ( $regular_price - $sales_price ) / $regular_price ) * 100 ) ;
if ($percentage_base > $percentage) {
$percentage = $percentage_base;
}
}
} else {
$percentage = round( ( ( $product->regular_price - $product->sale_price ) / $product->regular_price ) * 100 );
}
return '<span class="onsale bg_primary headerfont">'. sprintf( __(' Save %s', 'virtue' ), $percentage . '%' ).'</span>';
}

2) as you can also see on the above, the “read more” links are not alligned properly inside the product box anymore.

3) The entire product layouts is messed up.

Example.

Before:

Now:

4) As I mentioned in the last post, 2 theme widgets in the theme builder are now missing that we where using

I hope you can help us fast, it’s back friday here, so this update is expensive for us.

  • The forum ‘Pinnacle Theme’ is closed to new topics and replies.