• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Elite_Vaf_Helper_Data类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: testShouldClearFromSession

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


示例17: testShouldClearFromSession

 function testShouldClearFromSession()
 {
     $flexibleSearch = $this->flexibleWheelSearch(array('stud_spread' => '5'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $flexibleSearch = $this->flexibleWheelSearch(array('stud_spread' => '0'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $this->assertEquals(0, $this->flexibleWheelSearch()->studSpread(), 'should clear stud spread from session');
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:8,代码来源:Elite_Vafwheel_Model_FlexibleSearchTests_StudSpreadTest.php


示例18: testShouldClearFromSession

 function testShouldClearFromSession()
 {
     $flexibleSearch = $this->flexibleTireSearch(array('section_width' => '205', 'aspect_ratio' => '55', 'diameter' => '16'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $flexibleSearch = $this->flexibleTireSearch(array('section_width' => '0', 'aspect_ratio' => '0', 'diameter' => '0'));
     Elite_Vaf_Helper_Data::getInstance()->storeFitInSession();
     $this->assertNull($this->flexibleTireSearch()->aspectRatio(), 'should clear aspect ratio from session');
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:8,代码来源:Elite_Vaftire_Model_FlexibleSearchTests_AspectRatioTest.php


示例19: testShouldClearFromSession

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


示例20: run

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Eloquent类代码示例发布时间:2022-05-23
下一篇:
PHP ElggUser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap