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


PHP AO::getURL方法代码示例

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


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

示例1: resultAction

 public function resultAction()
 {
     $this->loadLayout();
     try {
         AO::getSingleton('catalogsearch/advanced')->addFilters($this->getRequest()->getQuery());
     } catch (Mage_Core_Exception $e) {
         AO::getSingleton('catalogsearch/session')->addError($e->getMessage());
         $this->_redirectError(AO::getURL('*/*/'));
     }
     $this->_initLayoutMessages('catalog/session');
     $this->renderLayout();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:12,代码来源:AdvancedController.php

示例2: sendmailAction

 public function sendmailAction()
 {
     $product = $this->_initProduct();
     $sendToFriendModel = $this->_initSendToFriendModel();
     $data = $this->getRequest()->getPost();
     if (!$product || !$product->isVisibleInCatalog() || !$data) {
         $this->_forward('noRoute');
         return;
     }
     $categoryId = $this->getRequest()->getParam('cat_id', null);
     if ($categoryId && ($category = AO::getModel('catalog/category')->load($categoryId))) {
         AO::register('current_category', $category);
     }
     $sendToFriendModel->setSender($this->getRequest()->getPost('sender'));
     $sendToFriendModel->setRecipients($this->getRequest()->getPost('recipients'));
     $sendToFriendModel->setIp(AO::getSingleton('log/visitor')->getRemoteAddr());
     $sendToFriendModel->setProduct($product);
     try {
         $validateRes = $sendToFriendModel->validate();
         if (true === $validateRes) {
             $sendToFriendModel->send();
             AO::getSingleton('catalog/session')->addSuccess($this->__('Link to a friend was sent.'));
             $this->_redirectSuccess($product->getProductUrl());
             return;
         } else {
             AO::getSingleton('catalog/session')->setFormData($data);
             if (is_array($validateRes)) {
                 foreach ($validateRes as $errorMessage) {
                     AO::getSingleton('catalog/session')->addError($errorMessage);
                 }
             } else {
                 AO::getSingleton('catalog/session')->addError($this->__('Some problems with data.'));
             }
         }
     } catch (Mage_Core_Exception $e) {
         AO::getSingleton('catalog/session')->addError($e->getMessage());
     } catch (Exception $e) {
         AO::getSingleton('catalog/session')->addException($e, $this->__('Some emails was not sent'));
     }
     $this->_redirectError(AO::getURL('*/*/send', array('id' => $product->getId())));
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:41,代码来源:ProductController.php


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