Skip to main content

Problem with this->config->get in checkout

More
15 years 2 months ago #21473 by campmans
Hi There,

I recently installed a fresh installation of HikaShop 1.5.2.

When proceeding to the shopping cart I get the following error:

Fatal error: Call to a member function get() on a non-object in /home/(...)/public_html/components/com_hikashop/views/checkout/tmpl/step.php on line 51

The piece of code in step.php (starting at line 50):
Code:
global $Itemid; $checkout_itemid = $this->config->get('checkout_itemid'); if(!empty($checkout_itemid )){ $Itemid = $checkout_itemid ; } $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&Itemid='.$Itemid; }

It looks like $this->config is not seen as an object. However, in previous versions of HikaShop I never got this problem, although these line of code are not new.

Does anyone have an idea what's wrong?
Thanks!

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21474 by nicolas
Hi,

$this->config is assigned in the main view file and it works for everyone. It's strange that you're getting that problem.
The solution is easy though, just add the code
$this->config = hikashop::config();
before that code in order to load the config object in that step file.

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21476 by campmans
Hi,

Thank you for the very fast reply. I was assuming that this->config was already working in this file, because of the main view file. Now because of this is working, I would conclude that the config object was not inherited in my step.php file before.

I'll test the configuration further on, but it seems to work :)

Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.147 seconds
Powered by Kunena Forum