if ($_discount && $_discount > $offer_row['discount']) {
$offer_row['discount'] = $_discount;
$discount_percent = $discount;
}
else {
$discount_percent = $offer_row['discount'] ? ($offer_row['discount'] / $offer_row['price'] * 100) : 0;
}
$_price = eshopPriceRound($offer_row['price']);
$_discount = eshopPriceRound($offer_row['discount']);
$_price_discount = eshopPriceRound($_price - $_discount);
}
}
// extensions //
if (!empty($this->extensions['component']) && !empty($this->extensions['element_tpl_data'])) {
$row = $this->load->{$this->extensions['component']}->element_tpl_data($row, $element);
}
// data content //
$row['data-content'] = $catalog_id . ':' . $row['id'];
$row['data_content'] = $catalog_id . ':' . $row['id'];
}
if (count($this->_config))
{
foreach ($return as $id => $row) {
$return[$id] = $this->element_tpl_data($row, $this->_config['elements_tpl_data']);
}
}
return $return;
}
'section_description' => '',
'section_image_src' => '',
'section_url_name' => '',
'section_title' => '',
'description' => '',
'elements' => $this->m_catalogs->elements_query($this->_config['catalog'], array(
'sections' => (!$section && is_array($this->_config['sections'])) ? $this->_config['sections'] : array($section_id),
'start' => $this->uri->page,
'limit' => $this->_config['per_page'],
'sort' => $this->_config['sort'],
'sort_type' => $this->_config['sort_type'],
{
return $this->element();
}
else
{
return $this->section();
}
}
return '';
}
$this->$class = new $class();
$this->_components[] = strtolower($class);
$return = call_user_func_array(array($this->$class, '__initialization'), array($config));
if (!empty($config['cache']))
{
$assets = method_exists($this->$class, '__assets') ? call_user_func_array([$this->$class, '__assets'], []) : [];
}
else {
$component_location = '';
}
$replacement = $this->load->component($component['name'], $component['value'], $component_location);
if ($replacement !== null) {
$content = str_replace($component['code'], $replacement, $content);
}
}
$this->engine->setKeywords($row['meta_keywords']);
$this->output->last_modified($row['date']);
$data = [
'title' => $this->engine->title,
'content' => '{message}' . $this->parse($row['content'], $row['id'], 'content', $access)
];
// fields //
if (isset($this->engine->fields['structure']) && count($this->engine->fields['structure']))
{
}
$JSmart = new $ROUTER->class();
if (method_exists($JSmart, $ROUTER->fetch_method())) {
call_user_func_array(array(&$JSmart, $ROUTER->fetch_method()), array());
}
else {
show_404();
}
if (file_exists(SYSPATH . 'vendor/autoload.php')) {
require_once SYSPATH . 'vendor/autoload.php';
}
require_once SYSPATH . 'core/JSmart.php';
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' => '555f2c741564dec3acdfb7aa9abc14c4', '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', 'section_id' => '29', '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_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', 'section_id' => '29', '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_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('19', '24', '25', '21', '22', '29'), '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§ions[]=0§ions_sub=0§ions_sub=1§ions_url=0§ions_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=§ions_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=&elements_display=&template=default&catalog=catalog&sections%5B%5D=0&sections_sub=0&sections_sub=1&sections_url=0&sections_url=1&sort=date&sort_type=desc&date_format=j-m-Y%2C%20H%3Ai&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</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) |