Category error

Phoca Cart - complex e-commerce extension
zabonis
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 25 Jun 2019, 11:26

Category error

Post 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

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category error

Post 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:
If you find Phoca extensions useful, please support the project
fab966
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 26 Oct 2015, 15:51

Re: Category error

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category error

Post 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
If you find Phoca extensions useful, please support the project
fab966
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 26 Oct 2015, 15:51

Re: Category error

Post by fab966 »

Hi,
it was my mistake.
I do not deleted all overrides after uninstall/install your latest version.
All works fine now.

Thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category error

Post by Jan »

Ok, great to hear it.

Jan
If you find Phoca extensions useful, please support the project
kdubey
Phoca Member
Phoca Member
Posts: 19
Joined: 18 Feb 2020, 22:39

Re: Category error

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category error

Post by Jan »

Hi, try to enable debug mode and paste here the complete error message (including file and row).

Thank you, Jan
If you find Phoca extensions useful, please support the project
kdubey
Phoca Member
Phoca Member
Posts: 19
Joined: 18 Feb 2020, 22:39

Re: Category error

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category error

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply