Page 1 of 1

Category error

Posted: 25 Jun 2019, 11:31
by zabonis
Joomla! 3.9.8 Stable
PHP 7.2.19
Phoca Cart 3.2.2
An error occurs when going into the category with goods:

Cannot use object of type stdClass as array
/var/www/u0665671/data/www/agld.ru/components/com_phocacart/layouts/product_image.php:12

Call stack
# Function Location
1 () JROOT/components/com_phocacart/layouts/product_image.php:12
2 include() JROOT/libraries/src/Layout/FileLayout.php:125
3 Joomla\CMS\Layout\FileLayout->render() JROOT/templates/harvest/html/com_phocacart/category/default.php:521
4 include() JROOT/libraries/src/MVC/View/HtmlView.php:697
5 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:230
6 Joomla\CMS\MVC\View\HtmlView->display() JROOT/components/com_phocacart/views/category/view.html.php:189
7 PhocaCartViewCategory->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_phocacart/controller.php:43
9 PhocaCartController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_phocacart/phocacart.php:14
11 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
12 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
14 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
15 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
16 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Re: Category error

Posted: 25 Jun 2019, 12:09
by Jan
Hi, are you able to let me know the login to your website e.g. per PM or email (best with super user login to your test site), because testing now on different servers and get no such problem :idea: (so it will be great to debug which values you get on your server there) :idea:

Re: Category error

Posted: 06 Sep 2019, 13:22
by fab966
Hi all,
I have the same problem.
Category with almost one product not works.
I get also "Cannot use object of type stdClass as array".

Did you have found the solution?
Many Thanks in advance.

Joomla 3.9.11
PhCart: 3.3.2
PHP 7.0

Fabrizio

Re: Category error

Posted: 08 Sep 2019, 16:46
by Jan
fab966 wrote: 06 Sep 2019, 13:22 I get also "Cannot use object of type stdClass as array".
Hi, can you paste the whole message here?

Jan

Re: Category error

Posted: 23 Oct 2019, 14:19
by fab966
Hi,
it was my mistake.
I do not deleted all overrides after uninstall/install your latest version.
All works fine now.

Thanks

Re: Category error

Posted: 23 Oct 2019, 16:37
by Jan
Ok, great to hear it.

Jan

Re: Category error

Posted: 18 Feb 2020, 22:48
by kdubey
Hi

I am facing a similar error whenever I click on a particular category to view the products. There is one product setup under Documentation Services (https://ehomegenie.com/index.php/add-services). The demo categories also have products attached. However, clicking on this category (and any other demo category) directs the user to an error page returning the following error:

0 Cannot use object of type stdClass as array

Any idea why this is happening and how this can be resolved?

Regards
Kamalesh.

Re: Category error

Posted: 19 Feb 2020, 00:18
by Jan
Hi, try to enable debug mode and paste here the complete error message (including file and row).

Thank you, Jan

Re: Category error

Posted: 19 Feb 2020, 17:33
by kdubey
Hi Jan

Thank you for your prompt response. I stumbled upon a fix on another forum - apparently the template that I have ben using also had a "phocacart" folder which was not being used. Re-naming this folder fixed the issue.

Regards
Kamalesh.

Re: Category error

Posted: 21 Feb 2020, 15:52
by Jan
Ok