Error when i set "login to display price" in settings.

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeError when i set "login to display price" in settings.

This topic has been marked as not resolved.

Hello.
I bought your pavilion theme and it´s really great.
I now get following error:
Warning: Division by zero in /var/www/clients/client1/web49/web/tb_themes/pavilion/catalog/plugin/ProductPlugin.php on line 288

And the line at the file ProductPlugin.php is: 287-291.

if ($product['special_num']) {
$product['savings_num'] = round((1 – $product['special_num'] / $product['price_num'] ) * 100);
} else {
$product['savings_num'] = false;
}

I use OpenCart 2.0.1.1.

Thanks.

 xciso
December 20, 2014 at 8:07 pm #35886

Hi,

it appears you have products with price zero, which produce this notice. In order to fix it, change line 287 from

if ($product['special_num']) {
to

if ($product['special_num'] && $product['price_num']) {

We will incorporate this change in the next Pavilion update.

BR,
ThemeBurn team

December 22, 2014 at 11:45 am #35943
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.