Page 1 of 1

(Virtuemart) How to show shipping price in cart ?

Posted: Sun Jun 19, 2011 1:01 pm
by JoomlaBased
Hello,

I want to show shipping price one cart but it doesn"t work for me.
There is code exist in administartor/components/virtuemart/html/basket.tpl.php like bellow;

Code: Select all

/* HANDLE SHIPPING COSTS */
	if( !empty($shipping_rate_id) && !ps_checkout::noShippingMethodNecessary() ) {
		$shipping = true;
		$vars["weight"] = $weight_total;
		$shipping_total = round( $ps_checkout->_SHIPPING->get_rate ( $vars ), 5 );
		
		$shipping_taxrate = $ps_checkout->_SHIPPING->get_tax_rate();

		// When the Shipping rate is shown including Tax
		// we have to extract the Tax from the Shipping Total
		if( $auth["show_price_including_tax"] == 1 ) {
			$shipping_tax = round($shipping_total- ($shipping_total / (1+$shipping_taxrate)), 5);
		}
		else {
			$shipping_tax = round($shipping_total * $shipping_taxrate, 5);
		}
		
		$shipping_total = $GLOBALS['CURRENCY']->convert( $shipping_total );
		$shipping_display = $GLOBALS['CURRENCY_DISPLAY']->getFullValue($shipping_total);
	}
	else {
		$shipping_total = $shipping_taxrate = 0;
		$shipping_display = "";
	}
I am using Standard Shipping Module.

Somebody can help to me ?

thanks...

Re: (Virtuemart) How to show shipping price in cart ?

Posted: Tue Jun 21, 2011 10:35 am
by JoomlaBased
Nobody has any idea how to do it ?

thanks

Re: (Virtuemart) How to show shipping price in cart ?

Posted: Mon Jul 04, 2011 4:36 pm
by KBJ
In my experience it would appear that the problem only occurs if the "Please select a Shipping Method!" is not ticked on the checkout tab of the virtuemart configuration.

Which is a bit of a problem for me because although I wish to charge shipping I do not want to give the user the option of which shipping method to use. I am currently investigating and it would appear to be because !empty($shipping_rate_id) in the if statement is False