当前位置: 首页>>代码示例>>PHP>>正文


PHP Elite_Vaf_Helper_Data类代码示例

本文整理汇总了PHP中Elite_Vaf_Helper_Data的典型用法代码示例。如果您正苦于以下问题:PHP Elite_Vaf_Helper_Data类的具体用法?PHP Elite_Vaf_Helper_Data怎么用?PHP Elite_Vaf_Helper_Data使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Elite_Vaf_Helper_Data类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testSelection

 function testSelection()
 {
     $vehicle = $this->createMMY(self::MAKE, self::MODEL, self::YEAR);
     $request = $this->getRequest($vehicle->toValueArray());
     $helper = new Elite_Vaf_Helper_Data();
     $helper->setRequest($request);
     $vehicle = $helper->vehicleSelection();
     $this->assertMMYTitlesEquals(self::MAKE, self::MODEL, self::YEAR, $vehicle);
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:9,代码来源:Elite_Vaf_SnippetTest.php

示例2: execute

 function execute()
 {
     $schema = new Elite_Vaf_Model_Schema();
     $leafLevel = Elite_Vaf_Helper_Data::getInstance()->getLeafLevel();
     $ajax = new Elite_Vaf_Model_Ajax();
     return $ajax->execute($schema);
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:7,代码来源:vafAjax.include.php

示例3: run

 function run()
 {
     $schema = new Elite_Vaf_Model_Schema();
     $db = Elite_Vaf_Helper_Data::getInstance()->getReadAdapter();
     $db->query('ALTER TABLE `elite_product_servicecode` DROP PRIMARY KEY ');
     $db->query('ALTER TABLE `elite_product_servicecode` ADD PRIMARY KEY ( `product_id` , `service_code` , `category1_id` , `category2_id` , `category3_id` , `category4_id` , `illustration_id` , `callout` ) ');
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:7,代码来源:20_change_product_srv_code_unique.php

示例4: listAction

 function listAction()
 {
     $helper = Elite_Vaf_Helper_Data::getInstance();
     $helper->setRequest($this->getRequest());
     $helper->storeFitInSession();
     if (!$helper->getFit() || !$helper->getProductIds()) {
         return $this->redirectToHomePage();
     }
     $this->myLoadLayout();
     switch (Elite_Vaf_Helper_Data::getInstance()->getConfig()->homepagesearch->mode) {
         case 'grid':
             // set in layout.xml
             break;
         default:
         case 'group':
             // unset the grid block added from layout.xml
             $this->getLayout()->getBlock('content')->unsetChild('vaf_products');
             $block = $this->createBlock('vaf/product_result_group', 'vaf_products');
             $this->appendBlock($block);
             break;
         case 'category':
             // unset the grid block added from layout.xml
             $this->getLayout()->getBlock('content')->unsetChild('vaf_products');
             $block = $this->createBlock('vaf/product_result_group2', 'vaf_products');
             $this->appendBlock($block);
             break;
         case 'group3':
             // unset the grid block added from layout.xml
             $this->getLayout()->getBlock('content')->unsetChild('vaf_products');
             $block = $this->createBlock('vaf/product_result_group3', 'vaf_products');
             $this->appendBlock($block);
             break;
     }
     $this->renderLayout();
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:35,代码来源:ProductController.php

示例5: getConfig

 function getConfig()
 {
     if (!$this->config instanceof Zend_Config) {
         $this->config = Elite_Vaf_Helper_Data::getInstance()->getConfig();
     }
     return $this->config;
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:Elite_Vaf_Model_Settings_Search.php

示例6: getProductCollection

 /**
  * I know its crap, but Magento sucks.
  * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
  */
 function getProductCollection()
 {
     if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
         $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
     } else {
         $ids = Elite_Vaf_Helper_Data::getInstance()->getProductIds();
         if (Mage::helper('catalogSearch')->getEscapedQueryText() && Mage::getStoreConfig('catalog/search/filtering', Mage::app()->getStore()->getStoreId())) {
             $collection = Mage::getResourceModel('catalogsearch/fulltext_collection')->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())->addSearchFilter(Mage::helper('catalogSearch')->getEscapedQueryText())->addIdFilter($ids)->setStore(Mage::app()->getStore())->addMinimalPrice()->addFinalPrice()->addTaxPercents()->addStoreFilter()->addUrlRewrite();
             Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
             // Comment out following line for work-around for:
             // 0000295: Group View not Displaying products, but products show in browsing
             Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
         } elseif (!Mage::helper('catalogSearch')->getEscapedQueryText()) {
             $collection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())->setStore(Mage::app()->getStore())->addMinimalPrice()->addFinalPrice()->addTaxPercents()->addStoreFilter()->addUrlRewrite();
             if ($ids) {
                 $collection->addIdFilter($ids);
             }
             Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
             // Comment out following line for work-around for:
             // 0000295: Group View not Displaying products, but products show in browsing
             Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);
         } else {
             $collection = Mage::getResourceModel('catalogsearch/fulltext_collection');
             $this->prepareProductCollection($collection);
         }
         $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
     }
     return $collection;
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:33,代码来源:SearchLayer.php

示例7: doSetUp

 function doSetUp()
 {
     $this->switchSchema('make,model,year');
     $this->expectedDefinition = $this->createMMY();
     $this->setRequestParams($this->expectedDefinition->toValueArray());
     $this->sitemap = new Elite_Vafsitemap_Model_Sitemap_Product_Sub(Elite_Vaf_Helper_Data::getInstance()->getConfig());
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:Elite_Vafsitemap_Model_Sitemap_Product_HtmlTest.php

示例8: testDefinitionsMMY

 function testDefinitionsMMY()
 {
     $sitemap = new Elite_Vafsitemap_Model_Sitemap_Vehicle(Elite_Vaf_Helper_Data::getInstance()->getConfig());
     $vehicles = $sitemap->getDefinitions(10);
     $this->assertTrue($vehicles[0] instanceof VF_Vehicle);
     $this->assertNotEquals(0, (int) $vehicles[0]->getLevel('year')->getId());
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:Elite_Vafsitemap_Model_Sitemap_VehicleTests_DefinitionMMYTest.php

示例9: run

 function run()
 {
     $schema = new VF_Schema();
     $db = Elite_Vaf_Helper_Data::getInstance()->getReadAdapter();
     $db->query('ALTER TABLE `elite_mapping` ADD `price` FLOAT NOT NULL  ');
     $db->query('ALTER TABLE `elite_import` ADD `price` FLOAT NOT NULL  ');
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:Elite_Vaf_sql_migrations_21_add_price_to_fitment.php

示例10: run

    function run()
    {
        $schema = new VF_Schema();
        $db = Elite_Vaf_Helper_Data::getInstance()->getReadAdapter();
        $db->query('DROP TABLE elite_import');
        $db->query('
CREATE TABLE IF NOT EXISTS `elite_import` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `make` varchar(255) NOT NULL,
  `make_id` int(50) NOT NULL,
  `model` varchar(255) NOT NULL,
  `model_id` int(50) NOT NULL,
  `year` varchar(255) NOT NULL,
  `year_id` int(50) NOT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `product_id` int(255) DEFAULT NULL,
  `universal` int(1) DEFAULT \'0\',
  `existing` int(1) NOT NULL,
  `line` int(255) NOT NULL,
  `mapping_id` int(255) NOT NULL,
  `note_message` varchar(255) NOT NULL,
  `notes` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;');
    }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:25,代码来源:Elite_Vaf_sql_migrations_18_change_universal_notnull.php

示例11: testCount1

 function testCount1()
 {
     $sitemap = new Elite_Vafsitemap_Model_Sitemap_Vehicle(Elite_Vaf_Helper_Data::getInstance()->getConfig());
     $vehicle = $this->createMMTC();
     $this->insertMappingMMTC($vehicle);
     $this->assertEquals(1, $sitemap->vehicleCount());
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:Elite_Vafsitemap_Model_Sitemap_VehicleTests_CountMMTCTest.php

示例12: indexAction

 function indexAction()
 {
     if (!Elite_Vaf_Helper_Data::getInstance()->getConfig()->seo->htmlSitemap) {
         return;
     }
     $this->loadLayoutAndBlock();
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:7,代码来源:ProductController.php

示例13: getSelections

 function getSelections()
 {
     $startTime = time();
     $vehicle = Elite_Vaf_Helper_Data::getInstance()->getFit();
     if (Mage::app()->getStore()->isAdmin()) {
         return $this->getData('selections');
     }
     if (!$this->superProductFits($vehicle)) {
         return $this->getData('selections');
     }
     $selections = $this->getData('selections');
     if (!$selections) {
         return;
     }
     if ($vehicle && $vehicle->getLeafValue()) {
         $productIds = Elite_Vaf_Helper_Data::getInstance()->getProductIds();
         $return = array();
         foreach ($selections as $product) {
             if (in_array($product->getId(), $productIds)) {
                 array_push($return, $product);
             }
         }
         return $return;
     }
     $endTime = time();
     var_dump($endTime - $startTime);
     exit;
     return $selections;
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:29,代码来源:Option.php

示例14: run

 function run()
 {
     $schema = new VF_Schema();
     $db = Elite_Vaf_Helper_Data::getInstance()->getReadAdapter();
     foreach ($schema->getLevels() as $level) {
         $db->query('ALTER TABLE `elite_mapping` ADD INDEX ( `entity_id` ) ;');
     }
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:8,代码来源:Elite_Vaf_sql_migrations_25_add_mapping_index.php

示例15: testShouldClearFromSession

 function testShouldClearFromSession()
 {
     $flexibleSearch = $this->flexibleWheeladapterSearch(array('wheel_lug_count' => '5'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $flexibleSearch = $this->flexibleWheeladapterSearch(array('wheel_lug_count' => '0'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $this->assertNull($this->flexibleWheeladapterSearch()->wheelSideLugCount(), 'should clear wheel side lug count from session');
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:8,代码来源:Elite_Vafwheeladapter_Model_FlexibleSearchTests_WheelSideLugCountTest.php


注:本文中的Elite_Vaf_Helper_Data类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。