DivisionByZeroError

HTTP 500 Whoops, looks like something went wrong.

Division by zero

Exception

DivisionByZeroError

  1.             if ($_discount && $_discount $offer_row['discount']) {
  2.                 $offer_row['discount']  = $_discount;
  3.                 $discount_percent       $discount;
  4.             }
  5.             else {
  6.                 $discount_percent $offer_row['discount'] ? ($offer_row['discount'] / $offer_row['price'] * 100) : 0;
  7.             }
  8.             $_price             eshopPriceRound($offer_row['price']);
  9.             $_discount          eshopPriceRound($offer_row['discount']);
  10.             $_price_discount    eshopPriceRound($_price $_discount);
Component_Eshop->element_tpl_data(array('id' => '416', 'sections' => array('29'), 'url_name' => 'shokolad--chernyy', 'date' => '25-07-2023, 12:22', 'user_id' => '87', 'title' => 'шоколад + черный', 'meta_title' => '', 'meta_description' => '', 'meta_keywords' => '', 'enable' => '1', 'position' => '410', 'views' => 0, 'comments' => '0', 'rating' => '0', 'date_update' => null, 'exchange_id' => null, 'images' => array(), 'brief' => '', 'description' => '', 'related' => '', 'num_id' => '416', 'catalog_id' => '1', 'element_id' => 'e3828de102e77a858db756e8949d6dd8', 'features' => 'a:5:{i:1;i:44;i:2;i:6;i:3;i:45;i:5;i:46;i:6;i:36;}', 'brand' => '', 'option_1' => '0', 'option_2' => '0', 'option_3' => '0', 'measure' => 'Килограмм', 'size_weight' => '0', 'size_length' => '0', 'size_width' => '0', 'size_height' => '0', 'quantity_trace' => '1', 'quantity_sort' => '1', 'article_base' => '0', 'measure_ratio' => '1', 'offer_description' => '0', 'offers' => array(array('id' => '429', 'catalog_id' => '1', 'element_id' => '416', 'title' => '2221', 'price' => '0', 'discount' => '5000', 'article' => '', 'quantity' => '196', 'position' => '1', 'date_update' => null, 'exchange_id' => null, 'features' => null, 'barcode' => '')), 'href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2/shokolad--chernyy.html', 'time' => '1690276920', 'section' => '60х2', 'section_id' => '29', 'section_href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2', 'section_image_src' => '', 'images_first_id' => '', 'images_first_src' => '', 'images_first_thumb_src' => '', 'images_first_title' => '', 'images_first_name' => '', 'images_first_ext' => '', 'currency' => false, 'sku_features' => array(), 'offer' => '', 'offer_title' => '', 'price' => '', 'price_discount' => '', 'discount' => '', 'discount_percent' => '', 'price_ratio' => '', 'price_discount_ratio' => '', 'discount_ratio' => '', 'article' => '', 'barcode' => '', 'quantity' => '', 'measure_ab' => 'кг'), 0) in /var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/models/m_catalogs.php (line 2630)
  1.             }
  2.         }
  3.         // extensions //
  4.         if (!empty($this->extensions['component']) && !empty($this->extensions['element_tpl_data'])) {
  5.             $row $this->load->{$this->extensions['component']}->element_tpl_data($row$element);
  6.         }
  7.         // data content //
  8.         $row['data-content'] = $catalog_id ':' $row['id'];
  9.         $row['data_content'] = $catalog_id ':' $row['id'];
M_catalogs->element_tpl_data(array('id' => '416', 'sections' => array('29'), 'url_name' => 'shokolad--chernyy', 'date' => '25-07-2023, 12:22', 'user_id' => '87', 'title' => 'шоколад + черный', 'meta_title' => '', 'meta_description' => '', 'meta_keywords' => '', 'enable' => '1', 'position' => '410', 'views' => 0, 'comments' => '0', 'rating' => '0', 'date_update' => null, 'exchange_id' => null, 'images' => array(), 'brief' => '', 'description' => '', 'related' => '', 'num_id' => '416', 'catalog_id' => '1', 'element_id' => '416', 'features' => 'a:5:{i:1;i:44;i:2;i:6;i:3;i:45;i:5;i:46;i:6;i:36;}', 'brand' => '', 'option_1' => '0', 'option_2' => '0', 'option_3' => '0', 'measure' => '4', 'size_weight' => '0', 'size_length' => '0', 'size_width' => '0', 'size_height' => '0', 'quantity_trace' => '1', 'quantity_sort' => '1', 'article_base' => '0', 'measure_ratio' => '1', 'offer_description' => '0', 'offers' => array(array('id' => '429', 'catalog_id' => '1', 'element_id' => '416', 'title' => '2221', 'price' => '0', 'discount' => '5000', 'article' => '', 'quantity' => '196', 'position' => '1', 'date_update' => null, 'exchange_id' => null, 'features' => null, 'barcode' => '')), 'href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2/shokolad--chernyy.html', 'time' => '1690276920', 'section' => '60х2', 'section_id' => '29', 'section_href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2', 'section_image_src' => '', 'images_first_id' => '', 'images_first_src' => '', 'images_first_thumb_src' => '', 'images_first_title' => '', 'images_first_name' => '', 'images_first_ext' => ''), 0) in /var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/models/m_catalogs.php (line 1047)
  1.         }
  2.         if (count($this->_config))
  3.         {
  4.             foreach ($return as $id => $row) {
  5.                 $return[$id] = $this->element_tpl_data($row$this->_config['elements_tpl_data']);
  6.             }
  7.         }
  8.         return $return;
  9.     }
M_catalogs->elements_query('1', array('sections' => array('0'), 'start' => false, 'limit' => 18, 'sort' => 'date', 'sort_type' => 'desc', 'enable' => true, 'component' => 'catalogs')) in /var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/components/catalogs/component.php (line 176)
  1.             'section_description'     => '',
  2.             'section_image_src'        => '',
  3.             'section_url_name'        => '',
  4.             'section_title'            => '',
  5.             'description'            => '',
  6.             'elements'      => $this->m_catalogs->elements_query($this->_config['catalog'], array(
  7.                 'sections'      => (!$section && is_array($this->_config['sections'])) ? $this->_config['sections'] : array($section_id),
  8.                 'start'         => $this->uri->page,
  9.                 'limit'         => $this->_config['per_page'],
  10.                 'sort'          => $this->_config['sort'],
  11.                 'sort_type'     => $this->_config['sort_type'],
  1.             {
  2.                 return $this->element();
  3.             }
  4.             else
  5.             {
  6.                 return $this->section();
  7.             }
  8.         }
  9.         return '';
  10.     }
Component_Catalogs->__initialization(array('extension_file' => '', 'elements_display' => '', 'template' => 'default', 'catalog' => 'catalog', 'sections' => array('0'), 'sections_sub' => '1', 'sections_url' => '1', 'sort' => 'date', 'sort_type' => 'desc', 'date_format' => 'j-m-Y, H:i', 'per_page' => '18', 'views_count' => '0', 'search' => '1', 'calendar' => '', 'sections_only' => '0', 'element_prev_next' => '0', 'brand' => '', 'option' => '0', 'buy_enable' => '', 'buy_disable' => '', 'quantity_trace' => '1')) in /var/www/stimpryja/data/www/stimpryja.ru/system/core/Loader.php (line 340)
  1.             $this->$class = new $class();
  2.             $this->_components[] = strtolower($class);
  3.             $return call_user_func_array(array($this->$class'__initialization'), array($config));
  4.             if (!empty($config['cache']))
  5.             {
  6.                 $assets method_exists($this->$class'__assets') ? call_user_func_array([$this->$class'__assets'], []) : [];
JSmart_Loader->component('eshop', 'extension_file=&elements_display=&template=default&catalog=catalog&sections[]=0&sections_sub=0&sections_sub=1&sections_url=0&sections_url=1&sort=date&sort_type=desc&date_format=j-m-Y, H:i&per_page=18&views_count=0&search=0&search=1&calendar=&sections_only=0&element_prev_next=0&brand=&option=0&buy_enable=&buy_disable=&quantity_trace=0&quantity_trace=1', '') in /var/www/stimpryja/data/www/stimpryja.ru/application/modules/structure/frontend/structure.php (line 195)
  1.                 }
  2.                 else {
  3.                     $component_location '';
  4.                 }
  5.                 $replacement $this->load->component($component['name'], $component['value'], $component_location);
  6.                 if ($replacement !== null) {
  7.                     $content str_replace($component['code'], $replacement$content);
  8.                 }
  9.             }
Structure->parse('<component data-name="eshop">extension_file=&amp;elements_display=&amp;template=default&amp;catalog=catalog&amp;sections%5B%5D=0&amp;sections_sub=0&amp;sections_sub=1&amp;sections_url=0&amp;sections_url=1&amp;sort=date&amp;sort_type=desc&amp;date_format=j-m-Y%2C%20H%3Ai&amp;per_page=18&amp;views_count=0&amp;search=0&amp;search=1&amp;calendar=&amp;sections_only=0&amp;element_prev_next=0&amp;brand=&amp;option=0&amp;buy_enable=&amp;buy_disable=&amp;quantity_trace=0&amp;quantity_trace=1</component>', '2', 'content', 'read') in /var/www/stimpryja/data/www/stimpryja.ru/application/modules/structure/frontend/structure.php (line 77)
  1.             $this->engine->setKeywords($row['meta_keywords']);
  2.             $this->output->last_modified($row['date']);
  3.             $data = [
  4.                 'title'     => $this->engine->title,
  5.                 'content'   => '{message}' $this->parse($row['content'], $row['id'], 'content'$access)
  6.             ];
  7.             // fields //
  8.             if (isset($this->engine->fields['structure']) && count($this->engine->fields['structure']))
  9.             {
  1. }
  2. $JSmart = new $ROUTER->class();
  3. if (method_exists($JSmart$ROUTER->fetch_method())) {
  4.     call_user_func_array(array(&$JSmart$ROUTER->fetch_method()), array());
  5. }
  6. else {
  7.     show_404();
  8. }
require_once('/var/www/stimpryja/data/www/stimpryja.ru/system/core/JSmart.php') in /var/www/stimpryja/data/www/stimpryja.ru/index.php (line 24)
  1. if (file_exists(SYSPATH 'vendor/autoload.php')) {
  2.     require_once SYSPATH 'vendor/autoload.php';
  3. }
  4. require_once SYSPATH 'core/JSmart.php';

Stack Trace

DivisionByZeroError
DivisionByZeroError:
Division by zero

  at /var/www/stimpryja/data/www/stimpryja.ru/application/modules/eshop/models/component_trait.php:473
  at Component_Eshop->element_tpl_data(array('id' => '416', 'sections' => array('29'), 'url_name' => 'shokolad--chernyy', 'date' => '25-07-2023, 12:22', 'user_id' => '87', 'title' => 'шоколад + черный', 'meta_title' => '', 'meta_description' => '', 'meta_keywords' => '', 'enable' => '1', 'position' => '410', 'views' => 0, 'comments' => '0', 'rating' => '0', 'date_update' => null, 'exchange_id' => null, 'images' => array(), 'brief' => '', 'description' => '', 'related' => '', 'num_id' => '416', 'catalog_id' => '1', 'element_id' => 'e3828de102e77a858db756e8949d6dd8', 'features' => 'a:5:{i:1;i:44;i:2;i:6;i:3;i:45;i:5;i:46;i:6;i:36;}', 'brand' => '', 'option_1' => '0', 'option_2' => '0', 'option_3' => '0', 'measure' => 'Килограмм', 'size_weight' => '0', 'size_length' => '0', 'size_width' => '0', 'size_height' => '0', 'quantity_trace' => '1', 'quantity_sort' => '1', 'article_base' => '0', 'measure_ratio' => '1', 'offer_description' => '0', 'offers' => array(array('id' => '429', 'catalog_id' => '1', 'element_id' => '416', 'title' => '2221', 'price' => '0', 'discount' => '5000', 'article' => '', 'quantity' => '196', 'position' => '1', 'date_update' => null, 'exchange_id' => null, 'features' => null, 'barcode' => '')), 'href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2/shokolad--chernyy.html', 'time' => '1690276920', 'section' => '60х2', 'section_id' => '29', 'section_href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2', 'section_image_src' => '', 'images_first_id' => '', 'images_first_src' => '', 'images_first_thumb_src' => '', 'images_first_title' => '', 'images_first_name' => '', 'images_first_ext' => '', 'currency' => false, 'sku_features' => array(), 'offer' => '', 'offer_title' => '', 'price' => '', 'price_discount' => '', 'discount' => '', 'discount_percent' => '', 'price_ratio' => '', 'price_discount_ratio' => '', 'discount_ratio' => '', 'article' => '', 'barcode' => '', 'quantity' => '', 'measure_ab' => 'кг'), 0)
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/models/m_catalogs.php:2630)
  at M_catalogs->element_tpl_data(array('id' => '416', 'sections' => array('29'), 'url_name' => 'shokolad--chernyy', 'date' => '25-07-2023, 12:22', 'user_id' => '87', 'title' => 'шоколад + черный', 'meta_title' => '', 'meta_description' => '', 'meta_keywords' => '', 'enable' => '1', 'position' => '410', 'views' => 0, 'comments' => '0', 'rating' => '0', 'date_update' => null, 'exchange_id' => null, 'images' => array(), 'brief' => '', 'description' => '', 'related' => '', 'num_id' => '416', 'catalog_id' => '1', 'element_id' => '416', 'features' => 'a:5:{i:1;i:44;i:2;i:6;i:3;i:45;i:5;i:46;i:6;i:36;}', 'brand' => '', 'option_1' => '0', 'option_2' => '0', 'option_3' => '0', 'measure' => '4', 'size_weight' => '0', 'size_length' => '0', 'size_width' => '0', 'size_height' => '0', 'quantity_trace' => '1', 'quantity_sort' => '1', 'article_base' => '0', 'measure_ratio' => '1', 'offer_description' => '0', 'offers' => array(array('id' => '429', 'catalog_id' => '1', 'element_id' => '416', 'title' => '2221', 'price' => '0', 'discount' => '5000', 'article' => '', 'quantity' => '196', 'position' => '1', 'date_update' => null, 'exchange_id' => null, 'features' => null, 'barcode' => '')), 'href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2/shokolad--chernyy.html', 'time' => '1690276920', 'section' => '60х2', 'section_id' => '29', 'section_href' => 'https://stimpryja.ru/catalog/machine-knitting/sherst-akril/60h2', 'section_image_src' => '', 'images_first_id' => '', 'images_first_src' => '', 'images_first_thumb_src' => '', 'images_first_title' => '', 'images_first_name' => '', 'images_first_ext' => ''), 0)
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/models/m_catalogs.php:1047)
  at M_catalogs->elements_query('1', array('sections' => array('0'), 'start' => false, 'limit' => 18, 'sort' => 'date', 'sort_type' => 'desc', 'enable' => true, 'component' => 'catalogs'))
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/components/catalogs/component.php:176)
  at Component_Catalogs->section()
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/catalogs/components/catalogs/component.php:111)
  at Component_Catalogs->__initialization(array('extension_file' => '', 'elements_display' => '', 'template' => 'default', 'catalog' => 'catalog', 'sections' => array('0'), 'sections_sub' => '1', 'sections_url' => '1', 'sort' => 'date', 'sort_type' => 'desc', 'date_format' => 'j-m-Y, H:i', 'per_page' => '18', 'views_count' => '0', 'search' => '1', 'calendar' => '', 'sections_only' => '0', 'element_prev_next' => '0', 'brand' => '', 'option' => '0', 'buy_enable' => '', 'buy_disable' => '', 'quantity_trace' => '1'))
     (/var/www/stimpryja/data/www/stimpryja.ru/system/core/Loader.php:340)
  at JSmart_Loader->component('eshop', 'extension_file=&elements_display=&template=default&catalog=catalog&sections[]=0&sections_sub=0&sections_sub=1&sections_url=0&sections_url=1&sort=date&sort_type=desc&date_format=j-m-Y, H:i&per_page=18&views_count=0&search=0&search=1&calendar=&sections_only=0&element_prev_next=0&brand=&option=0&buy_enable=&buy_disable=&quantity_trace=0&quantity_trace=1', '')
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/structure/frontend/structure.php:195)
  at Structure->parse('<component data-name="eshop">extension_file=&amp;elements_display=&amp;template=default&amp;catalog=catalog&amp;sections%5B%5D=0&amp;sections_sub=0&amp;sections_sub=1&amp;sections_url=0&amp;sections_url=1&amp;sort=date&amp;sort_type=desc&amp;date_format=j-m-Y%2C%20H%3Ai&amp;per_page=18&amp;views_count=0&amp;search=0&amp;search=1&amp;calendar=&amp;sections_only=0&amp;element_prev_next=0&amp;brand=&amp;option=0&amp;buy_enable=&amp;buy_disable=&amp;quantity_trace=0&amp;quantity_trace=1</component>', '2', 'content', 'read')
     (/var/www/stimpryja/data/www/stimpryja.ru/application/modules/structure/frontend/structure.php:77)
  at Structure->index()
     (/var/www/stimpryja/data/www/stimpryja.ru/system/core/JSmart.php:122)
  at require_once('/var/www/stimpryja/data/www/stimpryja.ru/system/core/JSmart.php')
     (/var/www/stimpryja/data/www/stimpryja.ru/index.php:24)