VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: alexphilips on April 20, 2017, 11:24:22 AM

Title: Help me! Cart
Post by: alexphilips on April 20, 2017, 11:24:22 AM
Can you tell me when the products are in the cart then how can I extract all the information about them like Item name (product name), Quantity, Price?
Title: Re: Help me! Cart
Post by: AH on April 20, 2017, 12:48:09 PM
http://forum.virtuemart.net/index.php?topic=79799.0 (http://forum.virtuemart.net/index.php?topic=79799.0)

http://forum.virtuemart.net/index.php?topic=104795.0 (http://forum.virtuemart.net/index.php?topic=104795.0)
Title: Re: Help me! Cart
Post by: GJC Web Design on April 20, 2017, 15:12:02 PM
read the cart object.. getCart()

from anywhere in Joomla

defined('DS') or define('DS', DIRECTORY_SEPARATOR);
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT .'/administrator/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
if(!class_exists('VirtueMartCart')) require(VMPATH_SITE.DS.'helpers'.DS.'cart.php');
$cart = VirtueMartCart::getCart(false);