Post by Univest » Sun Feb 05, 2012 1:18 am

Hi Guys

I have made some modifications to the header code, as you can see from the code
I want to show the checkout and cart button when products or vouchers in cart and
only show the account button if customer logged in.
Now problem is that everything works fine but these buttons work when conditions are
met but need page fresh to reload the elements. Can someone please tell me
the ajax code to bake into the php to refresh only these buttons when conditions are met and
hide when condition not met.
Fading them in like the notification bar. I got a $10 dollar budget.
thank you in advance

Code: Select all

<!-- checks if product in cart and if yes shows checkout and cart button -->  
    <ul class="main_menu">                                                                          
    <?php if ($this->cart->hasProducts()) { ?>
     <li><a id="top-checkout" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
     <li><a id="top-cart" href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a></li>
  
  <?php } else { ?>
 <!-- checks if voucher in cart and if yes shows checkout and cart button -->  

   <?php if ($this->cart->hasProducts() || (isset($this->session->data['vouchers']) && $this->session->data['vouchers'])) { ?>
      <li><a id="top-checkout" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>
      <li><a id="top-cart" href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a></li>
    <?php } ?>

 <?php } ?>

<!--       END      -->
<!-- checks if customer is logged in and if yes shows account button --> 
      <?php if ($logged) { ?>
      <li><a id="top-account" href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
     <?php } ?>
<!--       END      -->
Last edited by Univest on Thu Feb 23, 2012 12:39 am, edited 1 time in total.

Newbie

Posts

Joined
Fri May 13, 2011 1:18 am

User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by Univest » Thu Feb 23, 2012 12:42 am

Thank you for the reply

Would you do it for my budget price?

thank you

Newbie

Posts

Joined
Fri May 13, 2011 1:18 am

User avatar
Active Member

Posts

Joined
Thu Nov 11, 2010 6:11 pm
Location - New Zealand (Tokomaru, Palmerston North)

Post by nitinrai » Fri Feb 24, 2012 11:30 am

did you get this done, i can do it.

Regards

Nick
Gtalk - nitinrai321
skype - dev.nitin


New member

Posts

Joined
Mon Mar 14, 2011 3:20 am
Who is online

Users browsing this forum: No registered users and 3 guests