i have this code in my shopping cart (magento 1.6.2)
<?php if ($this->getQuote()->getSubtotal() < 41.28): ?>
<?php $subtotalamt = $this->getQuote()->getSubtotal(); ?>
<?php $freeshipamt = 41.28; ?>
<?php $sumtotal = ($freeshipamt - $subtotalamt )* 1.21; ?>
<?php Mage::helper('checkout')->formatPrice($sumtotal); ?>
<p>Gratis verzending vanaf € 49,95 <br/>(binnen Nederland)</p><p>
<strong>Nog <span>€ <?php print number_format($sumtotal, 2, ',', ' '); ?></span>
tot gratis verzending!</strong></p>
<?php else: ?><p><strong>Uw bestelling wordt GRATIS verzonden!</strong> <br/>(binnen Nederland)</p>
<?php endif ?>
<?php /* You are just <span>$<?php print ($sumtotal); ?></span> away from earning free shipping!</p> */ ?>
This code calculates the needed amount for the customer to receive free shipping within the Netherlands.
Is there a way to add some code so when a vistor from a other country visits our webshop the amount is changed for free shipping. Like germany or belgium. They receive free shipping from 149,95.
I guess there should be a php if
whick can determine the origin of the vistors ip-adress.
Can anyone help me to set this up?