Exemplo n.º 1
0
	public function __construct($attributes = array()){
	
		$helper =  Mage::helper('ve_easyslide/data');		
		$this->_config['show'] = $helper->get('show', $attributes);
		if(!$this->_config['show']) return;			
		parent::__construct();		
			
		$this->_config['title'] = $helper->get('title', $attributes);
		$this->_config['folder'] = $helper->get('folder', $attributes);		
		$this->_config['height'] = $helper->get('height', $attributes);
		$this->_config['width'] = $helper->get('width', $attributes);
		$this->_config['autoplay'] = $helper->get('autoplay', $attributes);
		$this->_config['controlnumber'] = $helper->get('controlnumber', $attributes);
		$this->_config['npbutton'] = $helper->get('npbutton', $attributes);
		$this->_config['duration'] = $helper->get('duration', $attributes);
		$this->_config['interval'] = $helper->get('interval', $attributes);
		$this->_config['thumbnailMode'] = $helper->get('thumbnailMode', $attributes);
		for($i=1; $i <= 10; $i++) 
		{
			$image = 'image'.$i;			
			$link = 'link'.$i;
			$imagename = $helper->get($image, $attributes);
			if($this->_config['thumbnailMode'] != "none"){
				$strreplace = '_'.$this->_config['width'].'_'.$this->_config['height'].'.';			
				$imagename = @str_replace('.',$strreplace,$imagename);
			}
			$this->_config[$image] = $imagename;
			$this->_config[$link] = $helper->get($link, $attributes);
		}	
		
		$this->_config['template'] = 've/easyslide/list.phtml';	
		
	}		
Exemplo n.º 2
0
 public function __construct($attributes = array())
 {
     parent::__construct($attributes);
     $selfData = $this->getData();
     // handler configuration for module config
     $configuration = $this->_getConfiguration();
     if (count($configuration)) {
         foreach ($configuration as $field => $value) {
             //if (!array_key_exists($field, $selfData)){
             $selfData[$field] = $value;
             //}
         }
     }
     //Zend_Debug::dump($attributes);die;
     // handler attributes for {{block ...}} in cms page
     if (count($attributes)) {
         foreach ($attributes as $field => $value) {
             //if (!array_key_exists($field, $selfData)){
             $selfData[$field] = $value;
             //}
         }
     }
     // re-save data
     $this->setData($selfData);
 }
Exemplo n.º 3
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $this->_show = $this->getGeneralConfig("show");
     if (!$this->_show) {
         return;
     }
     parent::__construct($attributes);
 }
Exemplo n.º 4
0
 /**
  * @param array $attributes
  */
 public function __construct($attributes = array())
 {
     $this->_helper = Mage::helper('devhh_brands/products');
     $this->_brandname = Mage::registry('brandname');
     $this->_optionId = $this->_helper->getValueIdByCode('manufacturer', $this->_brandname);
     $this->addData(array('cache_lifetime' => false, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG), 'cache_key' => 'brands-list-' . $this->_optionId));
     parent::__construct();
 }
 public function __construct()
 {
     parent::__construct();
     if (Mage::helper('adjnav')->isModuleEnabled('Aitoc_Aitproductslists')) {
         $this->setTemplate('aitcommonfiles/design--frontend--base--default--template--catalog--product--list.phtml');
     } else {
         $this->setTemplate('catalog/product/list.phtml');
     }
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct();
     $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml');
     $this->addPriceBlockType('giftcard', 'enterprise_giftcard/catalog_product_price', 'giftcard/catalog/product/price.phtml');
     $this->addPriceBlockType('msrp', 'catalog/product_price', 'catalog/product/price_msrp.phtml');
     $this->addPriceBlockType('msrp_item', 'catalog/product_price', 'catalog/product/price_msrp_item.phtml');
     $this->addPriceBlockType('msrp_noform', 'catalog/product_price', 'catalog/product/price_msrp_noform.phtml');
 }
Exemplo n.º 7
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort("entity_id", "DESC")->addAttributeToSelect(array('name', 'price', 'small_image'))->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())->setPageSize($this->get_prod_count())->addAttributeToSort($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 8
0
 public function __construct()
 {
     parent::__construct();
     $now = date("Y-m-d 00:00:00");
     $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToSelect('special_to_date')->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', array('neq' => 1))->addAttributeToFilter('special_price', array('neq' => ''))->addAttributeToFilter(array(array('attribute' => 'special_to_date', 'date' => true, 'gteq' => $now), array('attribute' => 'special_to_date', 'is' => new Zend_Db_Expr('null'))), '', 'left')->addAttributeToFilter(array(array('attribute' => 'special_from_date', 'date' => true, 'lteq' => $now), array('attribute' => 'special_from_date', 'is' => new Zend_Db_Expr('null'))), '', 'left');
     if ($limit = (int) Mage::getStoreConfig('onsale/configuration/limit')) {
         $collection->getSelect()->limit($limit);
     }
     $this->_collection = $collection;
 }
Exemplo n.º 9
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort('created_at', 'desc')->setPageSize($this->get_prod_count())->addAttributeToSelect(array('name', 'price', 'small_image'))->setStoreId($storeId)->addStoreFilter($storeId)->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 10
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getResourceModel('reports/product_collection')->addOrderedQty()->addAttributeToSelect(array('name', 'price', 'small_image', 'short_description', 'description'))->setStoreId($storeId)->addStoreFilter($storeId)->setPageSize($this->get_prod_count())->setOrder($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 11
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $todayStartOfDayDate = Mage::app()->getLocale()->date()->setTime('00:00:00')->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
     $todayEndOfDayDate = Mage::app()->getLocale()->date()->setTime('23:59:59')->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
     $collection = Mage::getResourceModel('catalog/product_collection');
     $collection->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
     $collection = $this->_addProductAttributesAndPrices($collection)->addStoreFilter()->addAttributeToFilter('news_from_date', array('or' => array(0 => array('date' => true, 'to' => $todayEndOfDayDate), 1 => array('is' => new Zend_Db_Expr('null')))), 'left')->addAttributeToFilter('news_to_date', array('or' => array(0 => array('date' => true, 'from' => $todayStartOfDayDate), 1 => array('is' => new Zend_Db_Expr('null')))), 'left')->addAttributeToFilter(array(array('attribute' => 'news_from_date', 'is' => new Zend_Db_Expr('not null')), array('attribute' => 'news_to_date', 'is' => new Zend_Db_Expr('not null'))))->addAttributeToSort('news_from_date', 'desc')->setPageSize($this->get_prod_count())->setCurPage($this->get_cur_page());
     $this->_productCollection = $collection;
     return $this->_productCollection;
 }
Exemplo n.º 12
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter(array(array('attribute' => 'featured', 'eq' => '1')))->setStoreId($storeId)->addStoreFilter($storeId)->setPageSize($this->get_prod_count())->addAttributeToSort($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 13
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $helper = Mage::helper('ves_deals/data');
     $this->_show = $this->getConfig("show");
     if (!$this->_show) {
         return;
     }
     /*End init meida files*/
     $mediaHelper = Mage::helper('ves_deals/media');
     $mediaHelper->addMediaFile("skin_css", "ves_deals/style.css");
     $mediaHelper->addMediaFile("js", "ves_deals/countdown.js");
     parent::__construct();
 }
Exemplo n.º 14
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getResourceModel('reports/product_collection')->addAttributeToSelect('*')->setStoreId($storeId)->addStoreFilter($storeId)->addViewsCount()->setPageSize($this->get_prod_count())->addAttributeToSort($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
     if ($productFlatData == "1") {
         $products->getSelect()->joinLeft(array('flat' => 'catalog_product_flat_' . $storeId), "(e.entity_id = flat.entity_id ) ", array('flat.name AS name', 'flat.small_image AS small_image', 'flat.price AS price', 'flat.special_price as special_price', 'flat.special_from_date AS special_from_date', 'flat.special_to_date AS special_to_date'));
     }
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 15
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $this->_show = $this->getGeneralConfig("show");
     if (!$this->_show) {
         return;
     }
     parent::__construct($attributes);
     $config_template = $this->getGeneralConfig("listing_layout");
     $my_template = "";
     if (isset($attributes['template']) && $attributes['template']) {
         $my_template = $attributes['template'];
     } elseif ($this->hasData("template")) {
         $my_template = $this->getData("template");
     } else {
         $my_template = "ves/brand/default.phtml";
     }
     $this->setTemplate($my_template);
 }
Exemplo n.º 16
0
 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $itemsCollection = Mage::getResourceModel('sales/order_item_collection')->join('order', 'order_id=entity_id')->addFieldToFilter('main_table.store_id', array('eq' => $storeId))->setOrder('main_table.created_at', 'desc');
     $itemsCollection->getSelect()->group(`main_table` . 'product_id');
     $prod = array();
     if (sizeof($itemsCollection) > 0) {
         foreach ($itemsCollection as $item) {
             //$product = Mage::getModel('catalog/product')->load($item->getProductId());
             $prod[] = $item->getProductId();
         }
     }
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToSelect(array('name', 'price', 'small_image'))->setStoreId($storeId)->addStoreFilter($storeId)->setPageSize($this->get_prod_count())->setOrder($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     $products->getSelect()->where('e.entity_id IN(?)', $prod);
     $products->setPageSize($this->get_prod_count())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     //echo $products->getSelect();exit;
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 17
0
 protected function _getProductCollection()
 {
     parent::__construct();
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $websiteId = Mage::app()->getWebsite()->getId();
     $customerGroupId = 0;
     $login = Mage::getSingleton('customer/session')->isLoggedIn();
     $attributes = Mage::getSingleton('catalog/config')->getProductAttributes();
     if ($login) {
         $customerGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
     }
     $products = Mage::getModel('catalog/product')->getCollection()->setStoreId($storeId)->addStoreFilter($storeId)->addAttributeToSelect($attributes)->addMinimalPrice()->addFinalPrice()->addTaxPercents()->setPageSize($this->get_prod_count())->setOrder($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     $todayDate = date("Y-m-d H:i:00", Mage::getModel('core/date')->timestamp(time()));
     $catalogRuleProducts = Mage::getResourceModel('catalogrule/rule_product_price_collection')->addFieldToFilter('customer_group_id', $customerGroupId)->addFieldToFilter('website_id', $websiteId)->addFieldToFilter('latest_start_date', array(array('lteq' => $todayDate), array('null' => true)))->addFieldToFilter('earliest_end_date', array(array('gteq' => $todayDate), array('null' => true)));
     $catalogRuleProductID = $catalogRuleProducts->getProductIds();
     $products->getSelect()->where('e.entity_id IN(?)', $catalogRuleProductID);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
Exemplo n.º 18
0
 public function __construct()
 {
     parent::__construct();
     $collection = $this->_getProductCollection();
     $this->setCollection($collection);
 }
Exemplo n.º 19
0
 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('callforprice/listcart.phtml');
 }
Exemplo n.º 20
0
 public function __construct()
 {
     parent::__construct();
     $this->_session = Mage::getSingleton('core/session');
     //$this->_questions = Mage::getModel('perguntas/question')->getAllQuestions();
 }
Exemplo n.º 21
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 22
0
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     die("sssssssssss");
     parent::__construct($attributes);
 }
Exemplo n.º 23
0
 public function __construct()
 {
     $this->setTemplate('galerieschiene/list.phtml');
     parent::__construct();
 }
Exemplo n.º 24
0
 public function __construct()
 {
     parent::__construct();
     $this->params = (array) Mage::getStoreConfig("featuredproducts/standalone");
 }