Hi,
My website homepage get error like this below, but other menu pages are working fine. why???
error shown in home page
Warning: Missing argument 2 for Cart\Currency::format(), called in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\storage\modification\catalog\controller\module\featured.php on line 42 and defined in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 24Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 25Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 25Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 26Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 26Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 27Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 27Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 30Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 30Warning: Missing argument 2 for Cart\Currency::format(), called in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\storage\modification\catalog\controller\module\featured.php on line 42 and defined in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 24Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 25Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 25Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 26Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 26Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 27Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 27Notice: Undefined variable: currency in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 30Notice: Undefined index: in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\library\cart\currency.php on line 30Notice: Error: Could not load template E:/HostingSpaces/prajjwal/buddhastatueonline.com/wwwroot/catalog/view/theme/default/template/default/template/module/featured.tpl! in E:\HostingSpaces\prajjwal\buddhastatueonline.com\wwwroot\system\storage\modification\system\library\template\basic.php on line 26
but other pages like this working fine.
http://buddhastatueonline.com/buddha-st ... dha-statue
what is happening?
Any help is highly appreciated
Thanks in advance.
Hi,
I'm sure you use OpenCart 2.2.0.0
In this version method ("function") format from class currency has an extra param currency code;
So in your modules instead of (old OC versions)
Now you have to use
Seems you modify featured module via ocmod
Check system\storage\modification\catalog\controller\module\featured.php on line 42
How look? like old oc version .. Right?
You need to modify ocmod (xml) that change this files and to add second param $this->session->data['currency']
I'm sure you use OpenCart 2.2.0.0
In this version method ("function") format from class currency has an extra param currency code;
So in your modules instead of
Code: Select all
$this->currency->format($some_value)
Now you have to use
Code: Select all
$this->currency->format($some_value, $this->session->data['currency'])
Seems you modify featured module via ocmod
Check system\storage\modification\catalog\controller\module\featured.php on line 42
How look? like old oc version .. Right?
You need to modify ocmod (xml) that change this files and to add second param $this->session->data['currency']
Thank you for your reply , i got confused with your suggestion because in line 42 of featured.php, the code is
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
yes i use oc 2.2 which is clean install, but have used some extensions for theme,export import data, and ocmod for ftp from isenselab.
Please suggest and help again.
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
yes i use oc 2.2 which is clean install, but have used some extensions for theme,export import data, and ocmod for ftp from isenselab.
Please suggest and help again.
in which file should i use to modify as per your statement
"You need to modify ocmod (xml) that change this files and to add second param $this->session->data['currency']"
Please update, its really urgent, my home page is down due to it
Thanks in advance.
"You need to modify ocmod (xml) that change this files and to add second param $this->session->data['currency']"
Please update, its really urgent, my home page is down due to it
Thanks in advance.
pta wrote:in which file should i use to modify as per your statement
"You need to modify ocmod (xml) that change this files and to add second param $this->session->data['currency']"
Please update, its really urgent, my home page is down due to it
Thanks in advance.
Please Help Help Help!!!! How to solve this
Nobody can't help this guy? )) Ok, I will do that.pta wrote:Thank you for your reply , i got confused with your suggestion because in line 42 of featured.php, the code is
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
yes i use oc 2.2 which is clean install, but have used some extensions for theme,export import data, and ocmod for ftp from isenselab.
Please suggest and help again.
String should be this:
Code: Select all
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
Who is online
Users browsing this forum: No registered users and 397 guests