Post by kkasfikis » Thu Feb 27, 2020 5:25 am

Hello guys,
When i click modification refresh under extensions > modifications > refresh the following file changes :

Code: Select all

storage/modification/catalog/controller/common/cart
from :

Code: Select all

<?php
class ControllerCommonCart extends Controller {
	public function index() {
		$this->load->language('common/cart');

		// Totals
		$this->load->model('setting/extension');

		$totals = array();
		$taxes = $this->cart->getTaxes();
		$total = 0;

		// Because __call can not keep var references so we put them into an array.
		$total_data = array(
			'totals' => &$totals,
			'taxes'  => &$taxes,
			'total'  => &$total
		);
			
		// Display prices
		if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
			$sort_order = array();

			$results = $this->model_setting_extension->getExtensions('total');

			foreach ($results as $key => $value) {
				$sort_order[$key] = $this->config->get('total_' . $value['code'] . '_sort_order');
			}

			array_multisort($sort_order, SORT_ASC, $results);

			foreach ($results as $result) {
				if ($this->config->get('total_' . $result['code'] . '_status')) {
					$this->load->model('extension/total/' . $result['code']);

					// We have to put the totals in an array so that they pass by reference.
					$this->{'model_extension_total_' . $result['code']}->getTotal($total_data);
				}
			}

			$sort_order = array();

			foreach ($totals as $key => $value) {
				$sort_order[$key] = $value['sort_order'];
			}

			array_multisort($sort_order, SORT_ASC, $totals);
		}

		$data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));

		$this->load->model('tool/image');
		$this->load->model('tool/upload');

		$data['products'] = array();


            if (defined('JOURNAL3_ACTIVE')) {
                $data['items_count'] = $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0);
                $data['items_price'] = $this->currency->format($total, $this->session->data['currency']);
            }
            
		foreach ($this->cart->getProducts() as $product) {
			if ($product['image']) {
				$image = $this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_height'));
			} else {
				$image = '';
			}

			$option_data = array();

			foreach ($product['option'] as $option) {
				if ($option['type'] != 'file') {
					$value = $option['value'];
				} else {
					$upload_info = $this->model_tool_upload->getUploadByCode($option['value']);

					if ($upload_info) {
						$value = $upload_info['name'];
					} else {
						$value = '';
					}
				}

				$option_data[] = array(
					'name'  => $option['name'],
					'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value),
					'type'  => $option['type']
				);
			}

			// Display prices
			if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
				$unit_price = $this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax'));
				
				$price = $this->currency->format($unit_price, $this->session->data['currency']);
				$total = $this->currency->format($unit_price * $product['quantity'], $this->session->data['currency']);
			} else {
				$price = false;
				$total = false;
			}

			$data['products'][] = array(
				'cart_id'   => $product['cart_id'],
				'thumb'     => $image,
				'name'      => $product['name'],
				'model'     => $product['model'],
				'option'    => $option_data,
				'recurring' => ($product['recurring'] ? $product['recurring']['name'] : ''),
				'quantity'  => $product['quantity'],
				'price'     => $price,
				'total'     => $total,
				'href'      => $this->url->link('product/product', 'product_id=' . $product['product_id'])
			);
		}

		// Gift Voucher
		$data['vouchers'] = array();

		if (!empty($this->session->data['vouchers'])) {
			foreach ($this->session->data['vouchers'] as $key => $voucher) {
				$data['vouchers'][] = array(
					'key'         => $key,
					'description' => $voucher['description'],
					'amount'      => $this->currency->format($voucher['amount'], $this->session->data['currency'])
				);
			}
		}

		$data['totals'] = array();

		foreach ($totals as $total) {
			$data['totals'][] = array(
				'title' => $total['title'],
				'text'  => $this->currency->format($total['value'], $this->session->data['currency']),
			);
		}

		$data['cart'] = $this->url->link('checkout/cart');
		$data['checkout'] = $this->url->link('checkout/checkout', '', true);

		return $this->load->view('common/cart', $data);
	}

	public function info() {
		$this->response->setOutput($this->index());
	}
}
to:

Code: Select all

<?php
class ControllerCommonCart extends Controller {
	public function index() {
		$this->load->language('common/cart');

		// Totals
		$this->load->model('setting/extension');

		$totals = array();
		$taxes = $this->cart->getTaxes();
		$total = 0;

		// Because __call can not keep var references so we put them into an array.
		$total_data = array(
			'totals' => &$totals,
			'taxes'  => &$taxes,
			'total'  => &$total
		);
			
		// Display prices
		if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
			$sort_order = array();

			$results = $this->model_setting_extension->getExtensions('total');

			foreach ($results as $key => $value) {
				$sort_order[$key] = $this->config->get('total_' . $value['code'] . '_sort_order');
			}

			array_multisort($sort_order, SORT_ASC, $results);

			foreach ($results as $result) {
				if ($this->config->get('total_' . $result['code'] . '_status')) {
					$this->load->model('extension/total/' . $result['code']);

					// We have to put the totals in an array so that they pass by reference.
					$this->{'model_extension_total_' . $result['code']}->getTotal($total_data);
				}
			}

			$sort_order = array();

			foreach ($totals as $key => $value) {
				$sort_order[$key] = $value['sort_order'];
			}

			array_multisort($sort_order, SORT_ASC, $totals);
		}

		$data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));

		$this->load->model('tool/image');
		$this->load->model('tool/upload');

		$data['products'] = array();


            if (defined('JOURNAL3_ACTIVE')) {
                $data['items_count'] = $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0);
                $data['items_price'] = $this->currency->format($total, $this->session->data['currency']);
            }
            
		foreach ($this->cart->getProducts() as $product) {
			if ($product['image']) {
				$image = $this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_height'));
			} else {
				$image = '';
			}

			$option_data = array();

			foreach ($product['option'] as $option) {
				if ($option['type'] != 'file') {
					$value = $option['value'];
				} else {
					$upload_info = $this->model_tool_upload->getUploadByCode($option['value']);

					if ($upload_info) {
						$value = $upload_info['name'];
					} else {
						$value = '';
					}
				}

				$option_data[] = array(
					'name'  => $option['name'],
					'value' => (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value),
					'type'  => $option['type']
				);
			}

			// Display prices
			if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
				$unit_price = $this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax'));
				
				$price = $this->currency->format($unit_price, $this->session->data['currency']);
				$total = $this->currency->format($unit_price * $product['quantity'], $this->session->data['currency']);
			} else {
				$price = false;
				$total = false;
			}

			$data['products'][] = array(
				'cart_id'   => $product['cart_id'],
				'thumb'     => $image,
				'name'      => $product['name'],
				'model'     => $product['model'],
				'option'    => $option_data,
				'recurring' => ($product['recurring'] ? $product['recurring']['name'] : ''),
				'quantity'  => $product['quantity'],
				'price'     => $price,
				'total'     => $total,
				'href'      => $this->url->link('product/product', 'product_id=' . $product['product_id'])
			);
		}

		// Gift Voucher
		$data['vouchers'] = array();

		if (!empty($this->session->data['vouchers'])) {
			foreach ($this->session->data['vouchers'] as $key => $voucher) {
				$data['vouchers'][] = array(
					'key'         => $key,
					'description' => $voucher['description'],
					'amount'      => $this->currency->format($voucher['amount'], $this->session->data['currency'])
				);
			}
		}

		$data['totals'] = array();

		foreach ($totals as $total) {
			$data['totals'][] = array(
				'title' => $total['title'],
				'text'  => $this->currency->format($total['value'], $this->session->data['currency']),
			);
		}

		$data['cart'] = $this->url->link('checkout/cart');
		$data['checkout'] = $this->url->link('checkout/checkout', '', true);

		return $this->load->view('common/cart', $data);
	}

	public function info() {
		$this->response->setOutput("$this->index());
	}
}
as you can see in the last line of code a " char is added before the $this, which of course crashes my website. When i remove the char the site continues to work normally, but when i click modification refresh again the char is added again too and the site crashes. I am just curious how is this possible ? It seems like magic to me
thank you for your answers
Last edited by kkasfikis on Fri Feb 28, 2020 12:15 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jan 02, 2020 8:10 pm

Post by kestas » Thu Feb 27, 2020 5:57 am

If you edit files which are in modification folder, after you refresh modifications, all files in this folder will be renewed according changes which is in OCMOD files. You need to use OCMOD to accomplish your changes.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by letxobnav » Thu Feb 27, 2020 10:13 am

the ocmod xml files containing the modifications are stored in the database and re-used whenever you press refresh.
options:
1) uninstall the modification and request a proper one from wherever it came
2) uninstall the modification, unpack the original ocmod zip file, change the xml, rezip and re-install
3) edit the xml located in the modification table and refresh mofifications.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Thu Feb 27, 2020 6:05 pm

kkasfikis wrote:
Thu Feb 27, 2020 5:25 am
When i click modification refresh under extensions > modifications > refresh the following file changes :

Code: Select all

storage/modification/catalog/controller/common/cart
Yes that's how the modification cache works.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by xxvirusxx » Thu Feb 27, 2020 6:23 pm

Possible some extension add " in the file....

Code: Select all

$this->response->setOutput("$this->index());
Is an easy fix. Check you extension :)

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by kkasfikis » Thu Feb 27, 2020 10:53 pm

paulfeakins wrote:
Thu Feb 27, 2020 6:05 pm
kkasfikis wrote:
Thu Feb 27, 2020 5:25 am
When i click modification refresh under extensions > modifications > refresh the following file changes :

Code: Select all

storage/modification/catalog/controller/common/cart
Yes that's how the modification cache works.
From what i understand, the ocmods use xml to define what changes should be made to the core files, and the generated files are stored inside storage/modification path. The xml is stored in the oc_modification table in the xml field. When i clear the oc_modification table nothing changes, each time im clicking refresh modifications the " char is added, despite the fact that the oc_modification table is clean. What do i miss ?
Thank you for all your replies

Newbie

Posts

Joined
Thu Jan 02, 2020 8:10 pm

Post by straightlight » Thu Feb 27, 2020 10:58 pm

What do i miss ?
If you modify the files directly from your storage folder rather than from the OCMod ZIP installation file and reinstall the extension, when clearing the OC cache, the changes will be reverted back to the previous state. When using OCMod, and requires modifications, it needs to be done from the installation folder on your end, or from a separate location, prior on reinstalling the OCMod package with the modified content with the OCMod installer with your x.ocmod.zip file.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Thu Feb 27, 2020 11:22 pm

kkasfikis wrote:
Thu Feb 27, 2020 10:53 pm
each time im clicking refresh modifications the " char is added, despite the fact that the oc_modification table is clean. What do i miss ?
Lol....You have checked in ocmod extensions?
Extensions-->Modifcations--> Log, and do a search for cart.php to see what ocmod extensions make changes in that file..

Clean? meaning you don't have/see any ocmod extensions?
If yes, then check in system folder for hidden extensions

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by kkasfikis » Thu Feb 27, 2020 11:49 pm

xxvirusxx wrote:
Thu Feb 27, 2020 11:22 pm
kkasfikis wrote:
Thu Feb 27, 2020 10:53 pm
each time im clicking refresh modifications the " char is added, despite the fact that the oc_modification table is clean. What do i miss ?
Lol....You have checked in ocmod extensions?
Extensions-->Modifcations--> Log, and do a search for cart.php to see what ocmod extensions make changes in that file..

Clean? meaning you don't have/see any ocmod extensions?
If yes, then check in system folder for hidden extensions
this is the modification log : (i cleared it and refreshed modifcationsto see what actually changes)

Code: Select all

2020-02-27 15:46:30 - MOD: Modification Default

FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69

FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168

FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59

FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73

FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18

FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Journal

FILE: system/engine/router.php
CODE: while
LINE: 101

FILE: catalog/controller/startup/startup.php
CODE: $languages = $this->model_localisation_language->getLanguages();
LINE: 50
CODE: self::$IS_JOURNAL = $config->get('config_template') === 'journal2' || $config->get('theme_default_directory') === 'journal2';
NOT FOUND - OPERATIONS ABORTED!

FILE: catalog/controller/event/theme.php
CODE: if (is_file(DIR_TEMPLATE . $theme . '/template/' . $view . '.tpl')) {
NOT FOUND - OPERATIONS ABORTED!

FILE: admin/controller/setting/setting.php
CODE: $theme = basename($this->request->get['theme']);
LINE: 977

FILE: catalog/controller/common/maintenance.php
CODE: $data['header'] = $this->load->controller('common/header');
LINE: 24
CODE: $data['footer'] = $this->load->controller('common/footer');
LINE: 25
CODE: $data['heading_title'] = $this->language->get('heading_title');
NOT FOUND - OPERATIONS ABORTED!

FILE: system/engine/event.php
CODE: public function register($trigger, Action $action, $priority = 0) {
LINE: 41

FILE: system/library/template.php
CODE: public function render
LINE: 57

FILE: system/library/cache.php
CODE: public function delete($key) {
LINE: 69

FILE: admin/controller/common/header.php
CODE: public function index() {
LINE: 5

FILE: admin/controller/common/column_left.php
CODE: // Catalog
LINE: 26

FILE: admin/controller/error/permission.php
CODE: $data['breadcrumbs'] = array();
LINE: 17

FILE: admin/controller/error/not_found.php
CODE: $data['breadcrumbs'] = array();
LINE: 17

FILE: system/library/response.php
CODE: if ($this->output) {
LINE: 119

FILE: catalog/model/tool/image.php
CODE: public function resize($filename, $width, $height) {
LINE: 2
CODE: (int)$height
LINE: 10
CODE: $image->resize($width, $height);
LINE: 33
CODE: if ($this->request->server['HTTPS']) {
LINE: 47
CODE: $image->save(DIR_IMAGE . $image_new);
LINE: 41
CODE: copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);
LINE: 50

FILE: catalog/controller/common/footer.php
CODE: public function index() {
LINE: 19

FILE: catalog/controller/common/column_left.php
CODE: public function index() {
LINE: 7

FILE: catalog/controller/common/column_right.php
CODE: public function index() {
LINE: 7

FILE: catalog/controller/common/content_top.php
CODE: public function index() {
LINE: 7

FILE: catalog/controller/common/content_bottom.php
CODE: public function index() {
LINE: 7

FILE: catalog/controller/common/cart.php
CODE: foreach ($this->cart->getProducts() as $product) {
LINE: 62

FILE: catalog/controller/checkout/cart.php
CODE: $json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));
NOT FOUND - OPERATIONS ABORTED!

FILE: catalog/controller/account/wishlist.php
CODE: $json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . (int)$this->request->post['product_id']), $product_info['name'], $this->url->link('account/wishlist'));
LINE: 143
CODE: $json['success'] = sprintf($this->language->get('text_login'), $this->url->link('account/login', '', true), $this->url->link('account/register', '', true), $this->url->link('product/product', 'product_id=' . (int)$this->request->post['product_id']), $product_info['name'], $this->url->link('account/wishlist'));
LINE: 161

FILE: catalog/controller/product/compare.php
CODE: $json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('product/compare'));
LINE: 173
CODE: $image = false;
LINE: 60
CODE: $json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));
NOT FOUND - OPERATIONS ABORTED!

FILE: catalog/controller/product/catalog.php
CODE: $results = $this->model_catalog_product->getProduct
LINE: 112

FILE: catalog/controller/product/category.php
CODE: $results = $this->model_catalog_product->getProduct
LINE: 174

FILE: catalog/controller/product/manufacturer.php
CODE: $results = $this->model_catalog_product->getProduct
LINE: 165

FILE: catalog/controller/product/search.php
CODE: $results = $this->model_catalog_product->getProduct
LINE: 202

FILE: catalog/controller/product/special.php
CODE: $results = $this->model_catalog_product->getProduct
LINE: 92
CODE: $data['products'][] = array(
LINE: 162
CODE: $data['products'][] = array(
LINE: 224
CODE: $data['products'][] = array(
LINE: 215
CODE: $data['products'][] = array(
LINE: 252
CODE: $data['products'][] = array(
LINE: 142
CODE: $data['products'][] = array(
LINE: 178
CODE: $data['products'][] = array(
LINE: 240
CODE: $data['products'][] = array(
LINE: 231
CODE: $data['products'][] = array(
LINE: 268
CODE: $data['products'][] = array(
LINE: 158
CODE: $data['products'][$product_id] = array(
LINE: 101
CODE: $data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get($this->config->get('config_theme') . '_image_category_width'), $this->config->get($this->config->get('config_theme') . '_image_category_height'));
NOT FOUND - OPERATIONS ABORTED!
CODE: $data['thumb'] = $this->model_tool_image->resize($category_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_category_height'));
LINE: 107
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
NOT FOUND - OPERATIONS ABORTED!
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
NOT FOUND - OPERATIONS ABORTED!
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
NOT FOUND - OPERATIONS ABORTED!
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get($this->config->get('config_theme') . '_image_product_width'), $this->config->get($this->config->get('config_theme') . '_image_product_height'));
NOT FOUND - OPERATIONS ABORTED!
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
LINE: 183
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
LINE: 169
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
LINE: 206
CODE: $image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
LINE: 96
CODE: $results = $this->model_catalog_category->getCategories($category_id);
LINE: 140
CODE: $this->load->model('tool/image');
LINE: 12
CODE: 'name' => $result['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
LINE: 164
CODE: $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 49
CODE: $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 101
CODE: $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 137
CODE: $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 131
CODE: $data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 65
CODE: $json['total'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
LINE: 183

FILE: catalog/controller/product/product.php
CODE: public function index() {
LINE: 17
CODE: $results = $this->model_catalog_product->getProductImages
LINE: 299
CODE: if ($product_info) {
LINE: 275
CODE: $data['review_status'] = $this->config->get('config_review_status');
LINE: 487
CODE: 'image'                   => $this->model_tool_image->resize($option_value['image'], 50, 50),
LINE: 456
CODE: $this->load->model('tool/image');
LINE: 12
LINE: 73
CODE: $data['categories'][$key]['manufacturer'][] = array(
LINE: 46
CODE: $image = false;
LINE: 64
CODE: 'stock'      => $stock,
LINE: 100

FILE: catalog/controller/checkout/checkout.php
CODE: $data['breadcrumbs'] = array();
LINE: 44
CODE: $output = $action->execute($this->registry, array(&$data));
LINE: 47
CODE: echo $output;
LINE: 133

FILE: system/library/db.php
CODE: private $adaptor;
LINE: 17
CODE: return $this->adaptor->query($sql);
LINE: 48
CODE: return $this->adaptor->query($sql, $params);
NOT FOUND - OPERATIONS ABORTED!

FILE: catalog/controller/common/search.php
CODE: public function index() {
LINE: 45

FILE: catalog/controller/common/header.php
CODE: $categories = $this->model_catalog_category->getCategories(0);
NOT FOUND - OPERATIONS ABORTED!

FILE: catalog/controller/common/menu.php
CODE: $categories = $this->model_catalog_category->getCategories(0);
LINE: 12
CODE: foreach ($this->model_catalog_information->getInformations() as $result) {
LINE: 26
CODE: $results = $this->model_catalog_product->getProductRelated($this->request->get['product_id']);
LINE: 519
CODE: $sort = 'p.sort_order';
LINE: 15
CODE: $order = 'ASC';
LINE: 27
CODE: $sort = 'p.sort_order';
LINE: 23
CODE: $order = 'ASC';
LINE: 35
CODE: $sort = 'p.sort_order';
LINE: 87
CODE: $order = 'ASC';
LINE: 99
CODE: $sort = 'p.sort_order';
LINE: 46
CODE: $order = 'ASC';
LINE: 58
CODE: $product_total = $this->model_catalog_product->getTotalProducts($filter_data);
LINE: 114
CODE: $results = $this->model_catalog_product->getProducts($filter_data);
LINE: 128
CODE: $data['sorts'] = array();
LINE: 237
CODE: sort($limits);
LINE: 314
CODE: $pagination = new Pagination();
LINE: 343
CODE: $product_total = $this->model_catalog_product->getTotalProducts($filter_data);
LINE: 199
CODE: $results = $this->model_catalog_product->getProducts($filter_data);
LINE: 213
CODE: $data['sorts'] = array();
LINE: 330
CODE: sort($limits);
LINE: 411
CODE: $pagination = new Pagination();
LINE: 444
CODE: $product_total = $this->model_catalog_product->getTotalProducts($filter_data);
LINE: 180
CODE: $results = $this->model_catalog_product->getProducts($filter_data);
LINE: 194
CODE: $data['sorts'] = array();
LINE: 307
CODE: sort($limits);
LINE: 384
CODE: $pagination = new Pagination();
LINE: 413
CODE: $product_total = $this->model_catalog_product->getTotalProducts($filter_data);
LINE: 204
CODE: $results = $this->model_catalog_product->getProducts($filter_data);
LINE: 218
CODE: $data['sorts'] = array();
LINE: 351
CODE: sort($limits);
LINE: 448
CODE: $pagination = new Pagination();
LINE: 497
CODE: $product_total = $this->model_catalog_product->getTotalProductSpecials();
LINE: 82
CODE: $results = $this->model_catalog_product->getProductSpecials($filter_data);
LINE: 101
CODE: $data['sorts'] = array();
LINE: 214
CODE: foreach($limits as $value) {
LINE: 293
CODE: $pagination = new Pagination();
LINE: 320

FILE: system/library/pagination.php
CODE: '">' . $this->text_prev . '
LINE: 54
LINE: 56
CODE: '">' . $this->text_next . '
LINE: 93
CODE: $this->model_catalog_product->updateViewed($this->request->get['product_id']);
LINE: 590
CODE: $data['stock'] = $this->language->get('text_instock');
LINE: 364

FILE: catalog/controller/account/register.php
CODE: $data['action'] = $this->url->link('account/register', '', true);
LINE: 120
CODE: return !$this->error;
LINE: 356

FILE: catalog/controller/account/edit.php
CODE: $data['back'] = $this->url->link('account/account', '', true);
LINE: 163
CODE: return !$this->error;
LINE: 256

FILE: catalog/controller/account/address.php
CODE: $data['back'] = $this->url->link('account/address', '', true);
LINE: 430
CODE: return !$this->error;
LINE: 529
LINE: 580

FILE: catalog/controller/account/login.php
CODE: $this->response->redirect
LINE: 51
LINE: 68
LINE: 115
LINE: 129
CODE: return !$this->error;
LINE: 242
CODE: $this->response->redirect
LINE: 18
LINE: 54
CODE: return !$this->error;
LINE: 392

FILE: catalog/controller/startup/seo_url.php
CODE: if ($query->num_rows) {
LINE: 44
CODE: if ($url[0] == 'product_id') {
LINE: 58
CODE: if (!isset($this->request->get['route'])) {
LINE: 97
CODE: public function rewrite($link) {
LINE: 119
CODE: $key == 'path'
LINE: 158
CODE: if ($url) {
LINE: 187

FILE: catalog/controller/extension/feed/google_sitemap.php
CODE: $output .= '</urlset>';
LINE: 71

FILE: catalog/controller/account/order.php
CODE: $data['products'][] = array(
LINE: 279
----------------------------------------------------------------

i cant find anything that changes the specific line of code.
thank you for your help , really appreciated

Newbie

Posts

Joined
Thu Jan 02, 2020 8:10 pm

Post by straightlight » Thu Feb 27, 2020 11:51 pm

From the above logs, what it shows are multiple operations aborted lines as well as the use of Journal which is an installed extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Thu Feb 27, 2020 11:52 pm

My mistake...is Journal...but I think is another extension...because

Journal 3 v3.0.46 use only this code:

Code: Select all

    <file path="catalog/controller/common/cart.php">
        <operation>
            <search><![CDATA[
            foreach ($this->cart->getProducts() as $product) {
            ]]></search>
            <add position="before"><![CDATA[
            if (defined('JOURNAL3_ACTIVE')) {
                $data['items_count'] = $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0);
                $data['items_price'] = $this->currency->format($total, $this->session->data['currency']);
            }
            ]]></add>
        </operation>
    </file>
And Journal 2 this code

Code: Select all

    <file path="catalog/controller/common/cart.php">
        <operation>
            <search><![CDATA[$image = '';]]></search>
            <add position="replace"><![CDATA[$image = $this->model_tool_image->resize('no_image.png', $this->config->get('config_image_cart_width'), $this->config->get('config_image_cart_height'));]]></add>
        </operation>
    </file>
Check directly in the file, maybe is a mistake there and in System folder for ocmod.xml files....or Vqmod extensions...if you have Vqmod installed.

Code: Select all

catalog/controller/common/cart.php

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by kkasfikis » Fri Feb 28, 2020 12:15 am

xxvirusxx wrote:
Thu Feb 27, 2020 11:52 pm
My mistake...is Journal...but I think is another extension...because

Journal 3 v3.0.46 use only this code:

Code: Select all

    <file path="catalog/controller/common/cart.php">
        <operation>
            <search><![CDATA[
            foreach ($this->cart->getProducts() as $product) {
            ]]></search>
            <add position="before"><![CDATA[
            if (defined('JOURNAL3_ACTIVE')) {
                $data['items_count'] = $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0);
                $data['items_price'] = $this->currency->format($total, $this->session->data['currency']);
            }
            ]]></add>
        </operation>
    </file>
And Journal 2 this code

Code: Select all

    <file path="catalog/controller/common/cart.php">
        <operation>
            <search><![CDATA[$image = '';]]></search>
            <add position="replace"><![CDATA[$image = $this->model_tool_image->resize('no_image.png', $this->config->get('config_image_cart_width'), $this->config->get('config_image_cart_height'));]]></add>
        </operation>
    </file>
Check directly in the file, maybe is a mistake there and in System folder for ocmod.xml files....or Vqmod extensions...if you have Vqmod installed.

Code: Select all

catalog/controller/common/cart.php
omg you are right, i should have edited the cart.php file by mistake
this issue is solver
thank you all so much for your help :)

Newbie

Posts

Joined
Thu Jan 02, 2020 8:10 pm
Who is online

Users browsing this forum: No registered users and 9 guests