I am making a Free Shipping top bar, i have added code in header.phtml which is located in app/design/frontend/mytheme/mytheme05/template/page/html/header.phtml
My Code is :
<div id= "um" class="container" style="text-align: center; font-weight: bold; ">
<?php
$grand= $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal());
$count = (int) filter_var($grand, FILTER_SANITIZE_NUMBER_INT);
$umer= 1500;
$total= $umer-$count;
if ($count < $umer)
{
echo "Free Shipping on $total";
}
else
echo "Free Shipping Enjoy";
//var_dump($count)
?>
I want to refresh this div when Add to cart Button is press.
The code is located in :
app/design/frontend/mytheme/mytheme05/template/magiccart/magicproduct/product/grid.phtml
Code is here`
<div class="actions-cart">
<?php if(in_array("cart", $actions)):?>
<?php if($_product->isSaleable()): ?>
<button type="button" title="<?php echo $this->__('Add to cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Umer') ?></span></span></button>
<?php else: ?>
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<?php endif; ?>
I want to refresh that div on onclick Button.
How I can do this ?