- Posts: 171
- Thank you received: 4
problem adding to cart
-- 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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
317 is $app->setUserState(HIKASHOP_COMPONENT.'.'.$cart_id, $this->cart->cart_id);
$cart_id = $this->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 or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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 > Main > Advanced settings)
If not, you maybe have a third extension which avoid the page refresh to update the cart informations.
Please Log in or Create an account to join the conversation.
problem is still not solved
Please Log in or Create an account to join the conversation.
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
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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
the code that gives the error is
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
what this plugin does is prevent items from different categories to be added to cart at the same time.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
and the lines that give the problems are
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
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
Thanks.
Please Log in or Create an account to join the conversation.
information has been send to you.
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
the plugin was disabled, thats why it worked... i have reenabled it and i have removed your ban from the firewall
Please Log in or Create an account to join the conversation.
I still have issues to reach the backend:
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 or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.