I have added an extra piece of code as below to show 3 buttons only if subtotal is greater than 0 and everything works
but, the buttons only show after the page refreshes and doesnt jump out once something is added to the cart. I think its becasue that section of code doesnt refresh and thats why it requires a page refresh. Can anyone please give a ajax or code suggestion that fixes this issue.
thank you in advance
Code: Select all
<?php if ($this->cart->getSubTotal() > 0 ) { ?>
<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>
<li><a id="top-account" href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
<?php } ?>