Author Topic: Help me! Cart  (Read 315 times)

alexphilips

  • Beginner
  • *
  • Posts: 1
  • A beginner
Help me! Cart
« 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?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2598
  • VirtueMart Version: 3.2.3
regards
A

Joomla 3.7.2
php 5.6 + php 7

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7483
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.2
Re: Help me! Cart
« Reply #2 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);
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation