Php 我的帐户、我的订单仅在用户登录移动菜单后显示
您好,我正在尝试显示我的订单,我的付款选项只有在用户登录移动菜单后才显示。现在megamenu显示两次。任何人都可以修复它。提前感谢Php 我的帐户、我的订单仅在用户登录移动菜单后显示,php,magento,Php,Magento,您好,我正在尝试显示我的订单,我的付款选项只有在用户登录移动菜单后才显示。现在megamenu显示两次。任何人都可以修复它。提前感谢 <li> <?php if(Mage::getSingleton('customer/session')->isLoggedIn()){ ?> <a style="text-transform: none; border-bottom: 0px !important; background:#212121 !important;
<li>
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()){
?>
<a style="text-transform: none; border-bottom: 0px !important; background:#212121 !important;color:#fff;margin-top:-10px;margin-left: -18px;"
href="<?php echo Mage::getBaseUrl().'customer/account/logout'; ?>">Logout</a>
<?php echo $menuHtml; ?>
<a class="extras" title="My Orders" href="<?php echo Mage::getBaseUrl().'sales/order/history'; ?>"><?php echo $this->__('My Orders') ?></a>
<a class="extras" title="My Payments" href="<?php echo Mage::getBaseUrl().'md_partialpayment/summary/list/'; ?>"><?php echo $this->__('My Payments') ?></a>
<?php
}else{
?>
<a style="text-transform: none; border-bottom: 0px !important; background:#212121 !important;color:#fff;margin-top:-15px;margin-left: -18px;font-weight:300;"
href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>">Login </a>
<?php echo $menuHtml; ?>
<?php
}
?>
</li>
试试这个
require_once 'app/Mage.php';
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name' => 'frontend'));
$sessionCustomer = Mage::getSingleton("customer/session");
if($sessionCustomer->isLoggedIn()) { ?>
<a style="text-transform: none; border-bottom: 0px !important; background:#212121 !important;color:#fff;margin-top:-10px;margin-left: -18px;"
href="<?php echo Mage::getBaseUrl().'customer/account/logout'; ?>">Logout</a>
<?php echo $menuHtml; ?>
<a class="extras" title="My Orders" href="<?php echo
Mage::getBaseUrl().'sales/order/history'; ?>"><?php echo $this->__('My
Orders') ?></a>
<a class="extras" title="My Payments" href="<?php echo
Mage::getBaseUrl().'md_partialpayment/summary/list/'; ?>"><?php echo
$this->__('My Payments') ?></a>
<?php } else { ?>
<a style="text-transform: none; border-bottom: 0px !important; background:#212121 !important;color:#fff;margin-top:-15px;margin-left: -18px;font-weight:300;"
href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>">Login </a>
<?php echo $menuHtml; ?>
THE CONTENT YOU WANT TO SHOW TO THOSE WHO ARE NOT LOGGED IN
<?php }?>
require_once'app/Mage.php';
乌马斯克(0);
Mage::app('default');
Mage::getSingleton('core/session',array('name'=>'frontend');
$sessionCustomer=Mage::getSingleton(“客户/会话”);
如果($sessionCustomer->isLoggedIn()){?>
要向未登录用户显示的内容
有人能帮我吗请提前谢谢你说的mega菜单显示两次是什么意思?@sagar singh在手机登录时,菜单显示两次实际上我的要求是,如果用户登录,它应该显示我的订单和我的付款,否则它应该只显示菜单,但这里菜单显示两次。首先显示您创建会话的位置并尝试使用MENU@sagarsing我不明白您的意思,您可以看看我添加的代码图像它是如何运行的吗。它在重复该菜单我需要添加此菜单我需要删除我的代码。我需要显示菜单以及这两个选项我是指我的订单和我的付款如果你不介意的话,请你在我写的代码中编辑一下,我现在正在做,但将来你必须自己做