public function getQty() { $rendered = $this->getRenderedBlock(); $helper = Mage::helper('adodis_ajaxcart'); if ($rendered && $rendered->getNameInLayout() == 'cart_sidebar' && $helper->isAjaxCartEnable() && Mage::getStoreConfig('adodis_ajaxcart/qty_settings/cart_block')) { $template = $this->getLayout()->createBlock('core/template', 'adodis.ajaxcart.sidebar.qty.template'); switch (Mage::getStoreConfig('adodis_ajaxcart/qty_settings/qty_view')) { case Adodis_Ajaxcart_Model_Adminhtml_System_Config_Source_Qtyview::ARROWS_LEFT_RIGHT: $template->setTemplate('adodis/ajaxcart/sidebar/arrows/left_right.phtml'); break; case Adodis_Ajaxcart_Model_Adminhtml_System_Config_Source_Qtyview::BUTTONS_TOP_BOTTOM: $template->setTemplate('adodis/ajaxcart/sidebar/buttons/top_bottom.phtml'); break; case Adodis_Ajaxcart_Model_Adminhtml_System_Config_Source_Qtyview::BUTTONS_LEFT_RIGHT: $template->setTemplate('adodis/ajaxcart/sidebar/buttons/left_right.phtml'); break; case Adodis_Ajaxcart_Model_Adminhtml_System_Config_Source_Qtyview::ARROWS_TOP_BOTTOM: default: $template->setTemplate('adodis/ajaxcart/sidebar/arrows/top_bottom.phtml'); } $template->setItem($this->getItem()); return $template->toHtml(); } else { return parent::getQty(); } }
public function getQty() { $rendered = $this->getRenderedBlock(); $helper = Mage::helper('flycart'); if ($rendered && ($rendered->getNameInLayout() == 'cart_sidebar' || $rendered->getName() == 'cart_sidebar') && $helper->isActivated() && Mage::getStoreConfig('flycart/qtyupdate/cart_block')) { $template = $this->getLayout()->createBlock('core/template', 'flycart.sidebar.qty.template'); $template->setTemplate('vt/flycart/sidebar/qty.phtml'); $template->setItem($this->getItem()); return $template->toHtml(); } else { return parent::getQty(); } }