16 class Cart extends \Magento\Checkout\Block\Cart\AbstractCart
45 \
Magento\Customer\Model\Session $customerSession,
46 \
Magento\Checkout\Model\Session $checkoutSession,
52 $this->_cartHelper = $cartHelper;
53 $this->_catalogUrlBuilder = $catalogUrlBuilder;
54 parent::__construct($context, $customerSession, $checkoutSession,
$data);
55 $this->_isScopePrivate =
true;
88 if (
$item->getStoreId() != $this->_storeManager->getStore()->getId() &&
89 !
$item->getRedirectUrl() &&
90 !
$product->isVisibleInSiteVisibility()
107 $item->getProduct()->setUrlDataObject($object);
119 return $this->
getQuote()->getHasError();
128 return $this->
getQuote()->getItemsSummaryQty();
137 $isActive = $this->
_getData(
'is_wishlist_active');
138 if ($isActive ===
null) {
139 $isActive = $this->_scopeConfig->getValue(
140 'wishlist/general/active',
142 ) && $this->httpContext->getValue(
145 $this->setIsWishlistActive($isActive);
156 return $this->
getUrl(
'checkout', [
'_secure' =>
true]);
166 $url = $this->_checkoutSession->getContinueShoppingUrl(
true);
168 $url = $this->_urlBuilder->getUrl();
182 return $this->_cartHelper->getIsVirtualQuote();
195 return $this->
getLayout()->getChildNames($childName);
211 throw new \Magento\Framework\Exception\LocalizedException(
__(
'Invalid method: %1',
$name));
223 if ($this->getCustomItems()) {
224 return $this->getCustomItems();
227 return parent::getItems();
236 return $this->
getQuote()->getItemsCount();
getData($key='', $index=null)
getUrl($route='', $params=[])
setData($key, $value=null)
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Catalog\Model\ResourceModel\Url $catalogUrlBuilder, \Magento\Checkout\Helper\Cart $cartHelper, \Magento\Framework\App\Http\Context $httpContext, array $data=[])
getChildHtml($alias='', $useCache=true)
if(!isset($_GET['name'])) $name