Page 1 of 1

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

Posted: 26 Aug 2023, 12:38
by morphinestyle
HI!
How can I render the number of items in the cart using isolated php code? (not from the cart module)

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

Posted: 26 Aug 2023, 15:27
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.

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

Posted: 28 Aug 2023, 16:09
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