Jump to content

How do to a shopping cart automatically update the value of the goods for cash on delivery?


adrian24a

Recommended Posts

Hi,

 

Sorry for my English,

 

How do to a shopping cart automatically update the value of the goods for cash on delivery? I've done already such changes in blockcart.php that I added functionality to doing cash on delivery. Here they are:

if(strstr($product['name'], "Elfa"))
		{
			$cod_cost = 5;//Tools::displayPrice(5, $currency);
			//$shipping_cost = 5;
		}
		else
		{
			$cod_cost = Tools::displayPrice(0, $currency);
			//$shipping_cost = Tools::displayPrice($base_shipping, $currency);
		}	
		/*Koniec kodu do okreslania ceny pobrania*/
		
		if(strstr($product['name'], "Elfa"))
		{
			$totalToPay = $params['cart']->getOrderTotal($useTax) + $cod_cost;
		}
		else
			$totalToPay = $params['cart']->getOrderTotal($useTax);

But the shopping cart automatically ie without refreshing the page does not update the status of the goods for cash on delivery. Where and how I can change this? I need to change that the shopping cart will be update the value of cash on delivery without refreshing.

 

Thanks for any help.

 

Greetings

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...