View Single Post
  #4  
Old 01-27-2018, 10:23 AM
 
BurtonTech BurtonTech is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 46
 

Default Re: Best way to query variables in 5.3

So spending about 5 seconds on Google shows me how to get cart totals in mode widely adopted shopping carts.

Magento:
Code:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart = $objectManager->get('\Magento\Checkout\Model\Cart'); $subTotal = $cart->getQuote()->getSubtotal(); $grandTotal = $cart->getQuote()->getGrandTotal();

or Woocommerce:
Code:
WC()->cart->get_cart_total();

But apparently to grab common order or cart data in the X-Cart, the calls vary from twig to twig file? I couldn't find any documentation or community support covering it, so my only options are to painfully reverse engineer even the most trivial tasks? Or is there an object that allows me to pull out variable data from whatever twig file I want to display it?

Any direction is greatly appreciated!
__________________
X-Cart Gold 4.4.5
X-Cart Ultimate 5.2.22
X-Cart Business 5.3.2.13
X-Payments 3
Reply With Quote