Ejemplo n.º 1
0
 /**
  * Returns a list of markers to generate a quick-view of the basket.
  *
  * @todo: implement getQuickView
  *
  * @return array Marker array for rendering
  */
 public function getQuickView()
 {
     $articleTypes = explode(',', $this->conf['regularArticleTypes']);
     $templateMarker = '###PRODUCT_BASKET_QUICKVIEW###';
     $template = $this->cObj->getSubpart($this->getTemplateCode(), $templateMarker);
     $basketArray = $this->languageMarker;
     $basketArray['###PRICE_GROSS###'] = Money::format($this->basket->getSumGross(), $this->currency);
     $basketArray['###PRICE_NET###'] = Money::format($this->basket->getSumNet(), $this->currency);
     $basketArray['###BASKET_ITEMS###'] = $this->basket->getArticleTypeCountFromList($articleTypes);
     $this->pi_linkTP('', array(), 0, $this->conf['basketPid']);
     $basketArray['###BASKETURL###'] = $this->cObj->lastTypoLinkUrl;
     $this->pi_linkTP('', array(), 0, $this->conf['checkoutPid']);
     $basketArray['###URL_CHECKOUT###'] = $this->cObj->lastTypoLinkUrl;
     // Hook for additional markers in quick view basket template
     $hooks = HookFactory::getHooks('Controller/BasketController', 'getQuickView');
     foreach ($hooks as $hook) {
         if (method_exists($hook, 'additionalMarker')) {
             $basketArray = $hook->additionalMarker($basketArray, $this);
         }
     }
     $this->setContent($this->cObj->substituteMarkerArray($template, $basketArray));
     return true;
 }