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

#   problem adding to cart

##

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#202134](#202134) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202134 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")* was created by *[jesper](/forum/user/8151-jesper "View jesper's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.5.37
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com_hikashop/classes/cart.php on line 317

Hi,

i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.

only error i see when doing debuging is
Notice: Trying to get property of non-object in administrator/components/com_hikashop/classes/cart.php on line 317

i have tried both with our custom template and the default beez20 template, and it does the same.

i have removed all other errors i was seeing on page, so no idea what is causing it.

any suggestions or help on how to fix this problem would be good

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 6 months ago [\#202147](#202147) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202147 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

Please give us the corresponding lines arround the one given in the php error message.
Do you have any cache enabled on your website ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago [\#202412](#202412) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202412 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

from line 310
Code:

JRequest::setVar('new_'.$cart_id,$cart-&gt;cart_id); JPluginHelper::importPlugin( 'hikashop' ); $dispatcher = JDispatcher::getInstance(); $do = true; $dispatcher-&gt;trigger( 'onBeforeCartUpdate', array(&amp;$this, &amp;$cart, &amp;$product_id, &amp;$quantity, &amp;$add, &amp;$type,&amp;$resetCartWhenUpdate,&amp;$force,&amp;$do) ); if (!$do) return false; if(!$app-&gt;isAdmin() &amp;&amp; $cart-&gt;cart_id){ $app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_id, $this-&gt;cart-&gt;cart_id); }

317 is $app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_id, $this-&gt;cart-&gt;cart_id);

$cart_id = $this-&gt;cart_type.'_id'; is defined in 278

if i look in the source of the lastest version from the site, it is the same as in that file.

i normaly do have cache on, but have turned off and cleared out the site to test if it was that, but still makes same error

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 6 months ago [\#202415](#202415) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202415 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

Ecommerce systems are not compatible with cache, so cache must be disabled in Joomla settings, Joomla cache plugin and potentially cache option in template.

Please send us backend and FTP access to your website via our contact form in order to debug that issue direclty on your website. Don't forget to give the url to that topic in the message.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 6 months ago -  11 years 6 months ago [\#202527](#202527) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202527 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

I have sendt you the info on the contact form

you know, that Joomla has flags you can set, that disable cache for one page/module ? so if you just set this info on everything that is dynmic of your parts, cache can be working fine.

And i have several other pages i help with their Joomla sites wiht Hikashop which runs cache on without any problems, so it really not a cache problems also showed by cache being disabled and the problem still persist

Last edit: 11 years 6 months ago by [jesper](/forum/user/8151-jesper "View jesper's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 6 months ago [\#202535](#202535) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#202535 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

The cart is correctly updated, but after we press F5 to refresh the whole page.

Without a backend access we can't see your settings, are you using the Ajax functionality to refresh the cart ?
(in Configuration &gt; Main &gt; Advanced settings)
If not, you maybe have a third extension which avoid the page refresh to update the cart informations.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#203215](#203215) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#203215 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

I have resubmitted the backend login information by the contact form.

problem is still not solved

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 5 months ago [\#203297](#203297) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#203297 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

I got backend access but I do not have FTP access like Xavier asked.

> Please send us backend and FTP access to your website via our contact form in order to debug that issue direclty on your website. Don't forget to give the url to that topic in the message.

But about your issue, can you please modify the line 317 from Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_id, $this-&gt;cart-&gt;cart_id);

into Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_id, $cart-&gt;cart_id);

It should fix the warning problem and I hope, the rest of your issue.

If not, please provide us the FTP access so we will be able to see and perform directly some tests.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [jesper](/forum/user/8151-jesper "View jesper's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#204851](#204851) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#204851 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

I have been testing alot on this and found out it was a plugin special for this page that does the problem.

the code that gives the error is Code:

$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart();

when i remove that code, everything works fine.

The code for this have been found on [ www.hikashop.com/support/documentation/6...r-documentation.html](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html)

what this plugin does is prevent items from different categories to be added to cart at the same time.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#205120](#205120) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205120 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Jerome any idea on this ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#205123](#205123) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205123 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

Do you now which plugin is causing that issue ? Please give us more details on this.
If you don't know which of them is causing this, please try to disable them one by one.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#205240](#205240) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205240 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi Xaviar,

yes as i wrote its a custom plugin to prevent items from selected main categories not to be added in cart as same time as from the other main categories.

the code is as following Code:

function onBeforeCartUpdate(&amp;$a, &amp;$cart, $product_id, $quantity, $add, $type,$resetCartWhenUpdate,$force,&amp;$do) { if ($cart-&gt;cart_id &amp;&amp; $quantity &gt; 0) { JFactory::getSession()-&gt;set('bbhika', ""); $pluginsClass = hikashop_get('class.plugins'); $plugin = $pluginsClass-&gt;getByName('hikashop','bedrebad'); $state = false; $mainkat = explode(",",$plugin-&gt;params['mainkat']); $productClass = hikashop_get('class.product'); $product=$productClass-&gt;get($product_id); $inkat = $this-&gt;maincat($product_id,$mainkat); $cartClass = hikashop_get('class.cart'); $cc = $cartClass-&gt;loadFullCart(); foreach($cc as $aa ) { $v_kat = $this-&gt;maincat($aa-&gt;product_id,$mainkat); if ($v_kat !== $inkat) $state = true; } if ($state) { $do = false; //Stop for at ligge varer i kurven JFactory::getApplication()-&gt;enqueueMessage(JText::_('HIKASHOP_BEDREBAD_ERROR'),'error'); JFactory::getSession()-&gt;set('bbhika', "error"); } } } function maincat($pid,$parrent) { $state = false; $database = JFactory::getDBO(); $database-&gt;setQuery('SELECT category_id FROM '.hikashop_table('product_category').' WHERE product_id = '.$pid.''); $ret = $database-&gt;loadObjectList(); foreach ($ret as $r) $id[] = $r-&gt;category_id; foreach ($id as $i) do { if (in_array($i,$parrent)) { $state = true; break; } $database-&gt;setQuery('SELECT category_parent_id FROM '.hikashop_table('category').' WHERE category_id = '.$i.''); $ret2 = $database-&gt;loadObject(); if (in_array($ret2-&gt;category_parent_id,$parrent)) { $state = true; break; } $i = $ret2-&gt;category_parent_id; } while ($ret2-&gt;category_parent_id != 0); return $state; }

and the lines that give the problems are Code:

$cartClass = hikashop_get('class.cart'); $cc = $cartClass-&gt;loadFullCart();

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#205671](#205671) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205671 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

So Xavier any help you can give me ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 5 months ago [\#205714](#205714) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205714 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hello,
Can you give us :
- A temporary FTP access to your website so that we can directly check your code
- Your custom plugin name (file location)
- Step by step instructions of how to reproduce your issue

Through our contact form so that we can directly test and fix it : [ www.hikashop.com/support/contact-us.html](http://www.hikashop.com/support/contact-us.html)

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#205833](#205833) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205833 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi Mohamed,

information has been send to you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#205969](#205969) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205969 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

I can see in the plugin that you changed from loadFullCart() function to the get() one, does that solve the issue ?
In frontend when adding a product it is correctly added to the cart, there is just the page to refresh so maybe you will have to disable the option to use ajax on add to cart buttons, or you have some cache enabled.

ps: I was not able to connect to backend, I tried the two passwords (old and new one) and I've been banned ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#205975](#205975) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205975 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

no it doesn't matter if i use the one or the other, gives same problem.

the plugin was disabled, thats why it worked... i have reenabled it and i have removed your ban from the firewall

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#205995](#205995) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#205995 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

I still have issues to reach the backend:
[ take.ms/97M1U](http://take.ms/97M1U)

But as you said that you reenabled the plugin I tried again and it seems to be working pretty fine.
If you disabled it, please check the backend access in order to help you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

11 years 5 months ago [\#206127](#206127) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#206127 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

if you just press the button you should get to the control panel without problems... i will look why it gives that error though.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#206173](#206173) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[problem adding to cart](/forum/26-product-category-display/877043-problem-adding-to-cart#206173 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.5.37 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  Hi,  i have a big problem on the site. When i go to there and add to cart, i have to add items 3 times to cart, before they get into for first item.  only error i see when doing debuging is Notice: Trying to get property of non-object in administrator/components/com&#95;hikashop/classes/cart.php on line 317  i have tried both with our custom template and the default beez20 template, and it does the same.  i have removed all other errors i was seeing on page, so no idea what is causing it.  any suggestions or help on how to fix this problem would be good")*

Hi,

When clicking on the button, I get redirected to the login page.
I just tried again, and I can definitively not reach your backend. The password seems to be no more working so autobanned a second time.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzcwNDMtcHJvYmxlbS1hZGRpbmctdG8tY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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.126 seconds

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