本文整理汇总了PHP中Mage::getBaseURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::getBaseURL方法的具体用法?PHP Mage::getBaseURL怎么用?PHP Mage::getBaseURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage
的用法示例。
在下文中一共展示了Mage::getBaseURL方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$id = $this->getRequest()->getParam('id');
$model = Mage::getModel('corporate/corporate')->load($id);
if ($model->getId() || $id == 0) {
$data = Mage::getSingleton('adminhtml/session')->getFormData(TRUE);
if (!empty($data)) {
$model->setData($data);
}
if ($model->getShortcode()) {
$imageFolderPath = Mage::getBaseURL('media') . DS . 'corporate' . DS . 'logos' . DS . $model->getShortcode() . '.png';
$model->setCimage($imageFolderPath);
}
Mage::register('corporate_data', $model);
$this->loadLayout();
$this->_setActiveMenu('corporate/items');
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
$this->getLayout()->getBlock('head')->setCanLoadExtJs(TRUE);
$this->_addContent($this->getLayout()->createBlock('corporate/adminhtml_corporate_edit'))->_addLeft($this->getLayout()->createBlock('corporate/adminhtml_corporate_edit_tabs'));
$this->renderLayout();
} else {
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('corporate')->__('Item does not exist'));
$this->_redirect('*/*/');
}
}
示例2: trackingCode
public function trackingCode()
{
$beetailerRef = Mage::getModel('core/cookie')->get('beetailer_ref');
$beetailerRefDate = Mage::getModel('core/cookie')->get('beetailer_ref_date');
if ($order = $this->getOrder()) {
$res = '<script type="text/javascript" src=\'//www.beetailer.com/s.js' . '?p[order_number]=' . $order->getIncrementId() . '&p[amount]=' . urlencode(sprintf("%.2f", $order->getSubtotal())) . '&p[order_date]=' . urlencode($order->getCreatedAt()) . '&p[email]=' . urlencode($order->getCustomerEmail()) . '&p[beetailer_ref]=' . urlencode($beetailerRef) . '&p[beetailer_ref_date]=' . urlencode($beetailerRefDate) . '&p[shop_domain]=' . urlencode(Mage::getBaseURL()) . '\'></script>';
Mage::getModel('core/cookie')->delete('beetailer_ref');
}
return $res;
}
示例3: indexAction
public function indexAction()
{
$this->loadLayout();
$this->_setActiveMenu('facebook-store');
/* Load bitnami Passwd */
$passw = $this->loadApiKey();
$host = str_replace("/index.php", "", Mage::getBaseURL());
$block = $this->getLayout()->createBlock('core/text', 'beetailer-admin')->setText("<iframe \nsrc='https://www.beetailer.com?from=iframe&api[key]=" . $passw . "&api[user]=beetailer&api[url]=" . $host . "' \nwidth=1124 height='7350' frameborder='0' scrolling='no' style='margin:0px auto;display:block;'></iframe>");
$this->_addContent($block);
$this->renderLayout();
}