コード例 #1
0
 public function toOptionArray()
 {
     $package = Mage_Core_Model_Design_Package::DEFAULT_PACKAGE;
     if (AW_All_Helper_Versions::getPlatform() == 100) {
         $package = 'enterprise';
     }
     if (AW_All_Helper_Versions::getPlatform() == 10) {
         $package = 'pro';
     }
     $dir = Mage::getDesign()->getSkinBaseDir(array('_area' => Mage_Core_Model_Design_Package::DEFAULT_AREA, '_default' => true, '_theme' => Mage_Core_Model_Design_Package::DEFAULT_THEME, '_package' => $package)) . DS . 'aw_countdown';
     $scopes = $this->_listDirectories($dir);
     return $scopes;
 }
コード例 #2
0
 public function checkExtensions()
 {
     $modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());
     sort($modules);
     $magentoPlatform = AW_All_Helper_Versions::getPlatform();
     foreach ($modules as $extensionName) {
         if (strstr($extensionName, 'AW_') === false) {
             continue;
         }
         if ($extensionName == 'AW_Core' || $extensionName == 'AW_All') {
             continue;
         }
         if ($platformNode = $this->getExtensionPlatform($extensionName)) {
             $extensionPlatform = AW_All_Helper_Versions::convertPlatform($platformNode);
             if ($extensionPlatform < $magentoPlatform) {
                 $this->disableExtensionOutput($extensionName);
             }
         }
     }
     return $this;
 }
コード例 #3
0
ファイル: Price.php プロジェクト: buttasg/cowgirlk
 protected function _prepareFinalPriceData($entityIds = null)
 {
     $this->_prepareDefaultFinalPriceTable();
     $write = $this->_getWriteAdapter();
     $select = $write->select()->from(array('e' => $this->getTable('catalog/product')), array('entity_id'))->join(array('cg' => $this->getTable('customer/customer_group')), '', array('customer_group_id'));
     $this->_addWebsiteJoinToSelect($select, true);
     $this->_addProductWebsiteJoinToSelect($select, 'cw.website_id', 'e.entity_id');
     $select->columns(array('website_id'), 'cw')->columns(array('tax_class_id' => new Zend_Db_Expr('0')))->where('e.type_id = ?', $this->getTypeId());
     $statusCond = $write->quoteInto('=?', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
     $this->_addAttributeToSelect($select, 'status', 'e.entity_id', 'cs.store_id', $statusCond, true);
     $openAmountMinExp = $this->_addAttributeToSelect($select, 'aw_gc_open_amount_min', 'e.entity_id', 'cs.store_id');
     $openAmountMaxExp = $this->_addAttributeToSelect($select, 'aw_gc_open_amount_max', 'e.entity_id', 'cs.store_id');
     $allowOpenAmountExp = $this->_addAttributeToSelect($select, 'aw_gc_allow_open_amount', 'e.entity_id', 'cs.store_id');
     $attrAmounts = $this->_getAttribute('aw_gc_amounts');
     $select->joinLeft(array('gca' => $this->getTable('aw_giftcard/product_amount')), 'gca.entity_id = e.entity_id AND gca.attribute_id = ' . $attrAmounts->getAttributeId() . ' AND (gca.website_id = cw.website_id OR gca.website_id = 0)', array());
     $_finalPrice = $this->_getPriceExprForOpenAmountAttr($openAmountMinExp, 'MIN', $allowOpenAmountExp);
     $_columns = array('price' => $_finalPrice, 'final_price' => $_finalPrice, 'min_price' => $_finalPrice, 'max_price' => $this->_getPriceExprForOpenAmountAttr($openAmountMaxExp, 'MAX', $allowOpenAmountExp), 'tier_price' => new Zend_Db_Expr('NULL'), 'base_tier' => new Zend_Db_Expr('NULL'));
     if (AW_All_Helper_Versions::getPlatform() == AW_All_Helper_Versions::CE_PLATFORM && version_compare(Mage::getVersion(), '1.7', '>=')) {
         $_columns = array('orig_price' => $_finalPrice, 'price' => $_finalPrice, 'min_price' => $_finalPrice, 'max_price' => $this->_getPriceExprForOpenAmountAttr($openAmountMaxExp, 'MAX', $allowOpenAmountExp), 'tier_price' => new Zend_Db_Expr('NULL'), 'base_tier' => new Zend_Db_Expr('NULL'), 'group_price' => new Zend_Db_Expr('NULL'), 'base_group_price' => new Zend_Db_Expr('NULL'));
     }
     if (AW_All_Helper_Versions::getPlatform() == AW_All_Helper_Versions::EE_PLATFORM && version_compare(Mage::getVersion(), '1.12', '>=')) {
         $_columns = array('price' => $_finalPrice, 'final_price' => $_finalPrice, 'min_price' => $_finalPrice, 'max_price' => $this->_getPriceExprForOpenAmountAttr($openAmountMaxExp, 'MAX', $allowOpenAmountExp), 'tier_price' => new Zend_Db_Expr('NULL'), 'base_tier' => new Zend_Db_Expr('NULL'), 'group_price' => new Zend_Db_Expr('NULL'), 'base_group_price' => new Zend_Db_Expr('NULL'));
     }
     $select->group(array('e.entity_id', 'cg.customer_group_id', 'cw.website_id'))->columns($_columns);
     if (!is_null($entityIds)) {
         $select->where('e.entity_id IN(?)', $entityIds);
     }
     Mage::dispatchEvent('prepare_catalog_product_index_select', array('select' => $select, 'entity_field' => new Zend_Db_Expr('e.entity_id'), 'website_field' => new Zend_Db_Expr('cw.website_id'), 'store_field' => new Zend_Db_Expr('cs.store_id')));
     $query = $select->insertFromSelect($this->_getDefaultFinalPriceTable());
     $write->query($query);
     return $this;
 }
コード例 #4
0
ファイル: Data.php プロジェクト: xiaoguizhidao/extensiongsd
 public function isEEVersion()
 {
     return AW_All_Helper_Versions::getPlatform() == AW_All_Helper_Versions::EE_PLATFORM;
 }
コード例 #5
0
 public function hasOptions($product = null)
 {
     if ($this->getProduct($product)->getOptions() || !Mage::registry('current_product') || AW_All_Helper_Versions::getPlatform() == AW_All_Helper_Versions::EE_PLATFORM || Mage::helper('aw_giftcard')->isAWMobile2Package()) {
         return true;
     }
     return false;
 }
コード例 #6
0
ファイル: Giftcard.php プロジェクト: buttasg/cowgirlk
 public function hasOptions($product = null)
 {
     if ($this->getProduct($product)->getOptions() || !Mage::registry('current_product') || AW_All_Helper_Versions::getPlatform() == AW_All_Helper_Versions::EE_PLATFORM) {
         return true;
     }
     return false;
 }