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


PHP App::redirectSeo方法代码示例

本文整理汇总了PHP中Gekosale\App::redirectSeo方法的典型用法代码示例。如果您正苦于以下问题:PHP App::redirectSeo方法的具体用法?PHP App::redirectSeo怎么用?PHP App::redirectSeo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gekosale\App的用法示例。


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

示例1: index

 public function index()
 {
     $clientData = App::getModel('client')->getClient();
     $this->registry->xajax->registerFunction(array('addProductToCart', App::getModel('cart/cart'), 'addAJAXProductToCart'));
     $this->registry->xajax->registerFunction(array('addOpinion', $this->productModel, 'addAJAXOpinionAboutProduct'));
     $this->registry->xajax->registerFunction(array('addProductRangeOpinion', $this->productModel, 'addAJAXProductRangeOpinion'));
     if (isset($this->_boxAttributes['tabbed'])) {
         $tabbed = $this->_boxAttributes['tabbed'];
     } else {
         $tabbed = 1;
     }
     if (isset($this->product['idproduct'])) {
         $range = $this->productModel->getRangeType((int) $this->productid);
         $this->productModel->getPhotos($this->product);
         $this->productModel->getOtherPhotos($this->product);
         $selectAttributes = $this->productModel->getProductAttributeGroups($this->product);
         foreach ($selectAttributes as $key => $val) {
             natsort($val['attributes']);
             $selectAttributes[$key]['attributes'] = $val['attributes'];
         }
         $attset = $this->productModel->getProductVariant($this->product);
         $Data = array();
         foreach ($attset as $group => $data) {
             $Data[implode(',', array_keys($data['variant']))] = array('setid' => $group, 'stock' => $data['stock'], 'sellprice' => $this->registry->core->processPrice($data['sellprice']), 'sellpricenetto' => $this->registry->core->processPrice($data['sellpricenetto']));
         }
         $productreview = App::getModel('productreview')->getProductReviews((int) $this->productid);
         $delivery = App::getModel('delivery')->getDispatchmethodPriceForProduct($this->product['price'], $this->product['weight']);
         $deliverymin = PHP_INT_MAX;
         foreach ($delivery as $i) {
             $deliverymin = min($deliverymin, $i['dispatchmethodcost']);
         }
         $files = App::getModel('product')->getFilesByProductId((int) $this->productid);
         $tabs = $this->registry->template->assign('tabbed', $tabbed);
         $eventData = Event::filter($this, 'frontend.productbox.assign', array(), NULL);
         foreach ($eventData as $Data) {
             foreach ($Data as $tab => $values) {
                 $this->registry->template->assign($tab, $values);
             }
         }
         $this->registry->template->assign('range', $range);
         $this->registry->template->assign('files', $files);
         $this->registry->template->assign('variants', json_encode($Data));
         $this->registry->template->assign('product', $this->product);
         $this->registry->template->assign('attributes', $selectAttributes);
         $this->registry->template->assign('attset', $attset);
         $this->registry->template->assign('productreview', $productreview);
         $this->registry->template->assign('delivery', $delivery);
         $this->registry->template->assign('deliverymin', $deliverymin);
         $this->productModel->updateViewedCount((int) $this->productid);
     } else {
         App::redirectSeo(App::getURLAdress());
     }
     return $this->registry->template->fetch($this->loadTemplate('index.tpl'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:54,代码来源:productdescriptionbox.php

示例2: index

 public function index()
 {
     $clientData = App::getModel('client')->getClient();
     $this->registry->xajax->registerFunction(array('addOpinion', $this->productModel, 'addAJAXOpinionAboutProduct'));
     //$this->registry->xajax->registerFunction(array(
     //'addProductRangeOpinion',
     //$this->productModel,
     //'addAJAXProductRangeOpinion'
     //));
     if (isset($this->_boxAttributes['tabbed'])) {
         $tabbed = $this->_boxAttributes['tabbed'];
     } else {
         $tabbed = 1;
     }
     if (isset($this->product['idproduct'])) {
         $range = $this->productModel->getRangeType((int) $this->productid);
         $this->productModel->getPhotos($this->product);
         $this->productModel->getOtherPhotos($this->product);
         $selectAttributes = $this->productModel->getProductAttributeGroups($this->product);
         foreach ($selectAttributes as $key => $val) {
             natsort($val['attributes']);
             $selectAttributes[$key]['attributes'] = $val['attributes'];
         }
         $attset = $this->productModel->getProductVariant($this->product);
         $Data = array();
         foreach ($attset as $group => $data) {
             $keys = array_keys($data['variant']);
             natsort($keys);
             $Data[implode(',', $keys)] = array('setid' => $group, 'stock' => $data['stock'], 'sellprice' => $this->registry->core->processPrice($data['sellprice']), 'sellpricenetto' => $this->registry->core->processPrice($data['sellpricenetto']), 'sellpriceold' => $this->registry->core->processPrice($data['attributepricegrossbeforepromotion']), 'sellpricenettoold' => $this->registry->core->processPrice($data['attributepricenettobeforepromotion']), 'availablity' => $data['availablity'], 'photos' => $data['photos']);
         }
         $productreview = App::getModel('productreview')->getProductReviews((int) $this->productid);
         $delivery = App::getModel('delivery')->getDispatchmethodPriceForProduct($this->product['price'], $this->product['weight']);
         $deliverymin = PHP_INT_MAX;
         foreach ($delivery as $i) {
             $deliverymin = min($deliverymin, $i['dispatchmethodcost']);
         }
         $files = App::getModel('product')->getFilesByProductId((int) $this->productid);
         $warranty = App::getModel('product')->getWarrantyByProductId((int) $this->productid);
         $tabs = $this->registry->template->assign('tabbed', $tabbed);
         $eventData = Event::filter($this, 'frontend.productbox.assign', array(), NULL);
         foreach ($eventData as $Data) {
             foreach ($Data as $tab => $values) {
                 $this->registry->template->assign($tab, $values);
             }
         }
         $opinion = Session::getVolatileOpinionAdded();
         if ($opinion[0] == 1) {
             $this->registry->template->assign('opinionadded', _('TXT_CLIENT_OPINION_ADDED'));
         } elseif ($opinion[0] == 2) {
             $this->registry->template->assign('opinionadded', _('TXT_GUEST_OPINION_ADDED'));
         }
         if ($this->product['enable'] == 0 && (int) Session::getActiveUserid() > 0) {
             $this->registry->template->assign('draft', _('TXT_PRODUCT_DRAFT'));
         }
         $this->registry->template->assign('range', $range);
         $this->registry->template->assign('files', $files);
         $this->registry->template->assign('warranty', $warranty);
         $this->registry->template->assign('variants', json_encode($Data));
         $this->registry->template->assign('product', $this->product);
         $this->registry->template->assign('attributes', $selectAttributes);
         $this->registry->template->assign('attset', $attset);
         $this->registry->template->assign('humanProductReviewCount', App::getModel('productreview')->getHumanOpinionsCount(count($productreview)));
         $this->registry->template->assign('productreview', $productreview);
         $this->registry->template->assign('delivery', $delivery);
         $this->registry->template->assign('deliverymin', $deliverymin);
         $this->productModel->updateViewedCount((int) $this->productid);
     } else {
         App::redirectSeo(App::getURLAdress());
     }
     return $this->registry->template->fetch($this->loadTemplate('index.tpl'));
 }
开发者ID:volfen,项目名称:Gekosale2,代码行数:71,代码来源:productbox.php


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