2016-04-11 59 views
0

enter image description here您好我想顯示我的訂單,我的付款選項只有當用戶登錄手機menu.Right現在megamenu顯示兩次可以任何一個修復它。提前感謝。我的帳戶,我的訂單隻顯示在用戶登錄手機菜單

<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> 
+0

誰能幫助我提前 – user6006309

+0

這多虧請你是什麼意思的大型菜單顯示兩次? –

+0

@sagar singh雖然檢查移動菜單實際上顯示兩次我的要求是如果用戶登錄它應該顯示我的訂單和我的付款否則它應該只顯示菜單但在這裏菜單顯示兩次。 – user6006309

回答

0

試試這個

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 }?> 
+0

中看到,我需要添加這一個,如果我需要刪除我的code.I需要顯示菜單以及這兩個選項我的意思是我的訂單和我的付款 – user6006309

+0

@ user6006309只是檢查我編輯 –

+0

你可以請編輯我的代碼,我已經寫了,如果你不介意 – user6006309

相關問題