How can I render $cart->get Cart Count Items() from isolated php code?

Phoca Cart - complex e-commerce extension
morphinestyle
Phoca Professional
Phoca Professional
Posts: 118
Joined: 19 Jan 2022, 19:55

How can I render $cart->get Cart Count Items() from isolated php code?

Post by morphinestyle »

HI!
How can I render the number of items in the cart using isolated php code? (not from the cart module)
morphinestyle
Phoca Professional
Phoca Professional
Posts: 118
Joined: 19 Jan 2022, 19:55

Re: How can I render $cart->getCartCountItems() from isolated php code?

Post by morphinestyle »

In this specific case i solved it differently with an override of the cart module.
But if it's simple to implement, it wouldn't hurt to know how.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How can I render $cart->get Cart Count Items() from isolated php code?

Post by Jan »

Hi, if you are running some isolated PHP code, mostly you need to load the items from database by yourself and manage all the features even by yourself. Or include all the Phoca Cart methods manually and use Phoca Cart methods.

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