Post by Lorigarris » Wed Jun 08, 2022 2:47 pm

When i add a product with 0.x price show error in category page and shop by filter extension taken a minimum price as 0.00 in the side left

My site: Error Page MyAccountAccess

Error: Notice: Trying to access array offset on value of type bool in /catalog/model/extension/module/so_filter_shop_by.php on line 313Notice: 313 Line : Code:

Code: Select all

$price = $this->tax->calculate($data['price'], $data['tax_class_id'], $this->config->get('config_tax'));
Full code:

Code: Select all

$data = $this->model_catalog_product->getProduct($result['product_id']);
        $price = $this->tax->calculate($data['price'], $data['tax_class_id'], $this->config->get('config_tax'));
        if ((float)$data['special']) {
            $price = $this->tax->calculate($data['special'], $data['tax_class_id'], $this->config->get('config_tax'));
        }
Last edited by Lorigarris on Thu Jun 09, 2022 11:52 am, edited 1 time in total.

Newbie

Posts

Joined
Thu May 12, 2022 2:49 pm

Post by IP_CAM » Thu Jun 09, 2022 12:21 am

so_filter_shop_by.php
This is most likely related to the Custom SO-Theme you're using, I would contact the Theme Seller to assist on this.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by straightlight » Thu Jun 09, 2022 12:46 am

Lorigarris wrote:
Wed Jun 08, 2022 2:47 pm
When i add a product with 0.x price show error in category page and shop by filter extension taken a minimum price as 0.00 in the side left

My site: Error Page

Error: Notice: Trying to access array offset on value of type bool in /catalog/model/extension/module/so_filter_shop_by.php on line 313Notice: 313 Line : Code:

Code: Select all

$price = $this->tax->calculate($data['price'], $data['tax_class_id'], $this->config->get('config_tax'));
Full code:

Code: Select all

$data = $this->model_catalog_product->getProduct($result['product_id']);
        $price = $this->tax->calculate($data['price'], $data['tax_class_id'], $this->config->get('config_tax'));
        if ((float)$data['special']) {
            $price = $this->tax->calculate($data['special'], $data['tax_class_id'], $this->config->get('config_tax'));
        }
See this modification for the price and special validations: https://github.com/opencart/opencart-3/ ... atured.php .

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
Who is online

Users browsing this forum: No registered users and 34 guests