Page 1 of 1

home page load error, but inside menu pages working

Posted: Fri Apr 08, 2016 3:06 am
by pta
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.

Re: home page load error, but inside menu pages working

Posted: Fri Apr 08, 2016 5:20 am
by oc-extensions
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

Code: Select all

$this->currency->format($some_value)
(old OC versions)

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']

Re: home page load error, but inside menu pages working

Posted: Fri Apr 08, 2016 12:06 pm
by pta
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.

Re: home page load error, but inside menu pages working

Posted: Fri Apr 08, 2016 1:25 pm
by pta
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.

Re: home page load error, but inside menu pages working

Posted: Thu Apr 14, 2016 12:10 pm
by pta
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

Re: home page load error, but inside menu pages working

Posted: Mon May 16, 2016 1:17 am
by iMateo
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.
Nobody can't help this guy? )) Ok, I will do that.
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']);
Must working.