[Skip to main content](#vessel-content)

#   Problem with this-&gt;config-&gt;get in checkout

##

- **[campmans](/forum/user/1839-campmans "View campmans's Profile")**
- [![campmans's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1839-campmans "View campmans's Profile") Topic Author
- [ Offline](/forum/user/1839-campmans)

Less More

- Posts: 8
- Thank you received: 0
-
-

15 years 3 months ago [\#21473](#21473) by [campmans](/forum/user/1839-campmans "View campmans's Profile")  *[Problem with this-&gt;config-&gt;get in checkout](/forum/4-how-to/21473-problem-with-this-config-get-in-checkout#21473 "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&#95;html/components/com&#95;hikashop/views/checkout/tmpl/step.php on line 51  The piece of code in step.php (starting at line 50):  It looks like $this-&gt;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!")* was created by *[campmans](/forum/user/1839-campmans "View campmans's Profile")*

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-&gt;config-&gt;get('checkout_itemid'); if(!empty($checkout_itemid )){ $Itemid = $checkout_itemid ; } $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&amp;Itemid='.$Itemid; }

It looks like $this-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNDczLXByb2JsZW0td2l0aC10aGlzLWNvbmZpZy1nZXQtaW4tY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

15 years 3 months ago [\#21474](#21474) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Problem with this-&gt;config-&gt;get in checkout](/forum/4-how-to/21473-problem-with-this-config-get-in-checkout#21474 "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&#95;html/components/com&#95;hikashop/views/checkout/tmpl/step.php on line 51  The piece of code in step.php (starting at line 50):  It looks like $this-&gt;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!")*

Hi,

$this-&gt;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-&gt;config = hikashop::config();
before that code in order to load the config object in that step file.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNDczLXByb2JsZW0td2l0aC10aGlzLWNvbmZpZy1nZXQtaW4tY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[campmans](/forum/user/1839-campmans "View campmans's Profile")**
- [![campmans's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1839-campmans "View campmans's Profile") Topic Author
- [ Offline](/forum/user/1839-campmans)

Less More

- Posts: 8
- Thank you received: 0
-
-

15 years 3 months ago [\#21476](#21476) by [campmans](/forum/user/1839-campmans "View campmans's Profile")  Replied by *[campmans](/forum/user/1839-campmans "View campmans's Profile")* on topic *[Re: Problem with this-&gt;config-&gt;get in checkout](/forum/4-how-to/21473-problem-with-this-config-get-in-checkout#21476 "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&#95;html/components/com&#95;hikashop/views/checkout/tmpl/step.php on line 51  The piece of code in step.php (starting at line 50):  It looks like $this-&gt;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!")*

Hi,

Thank you for the very fast reply. I was assuming that this-&gt;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 ![:)](/media/kunena/emoticons/3.png ":)")

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzIxNDczLXByb2JsZW0td2l0aC10aGlzLWNvbmZpZy1nZXQtaW4tY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
