Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Add shipping total to shopping cart page

Add shipping total to shopping cart page

Locked

Views: 1,094

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
8 Dec 2007, 5:15 PM
#1
jerusalem_spider avatar

jerusalem_spider

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Add shipping total to shopping cart page

I have flat rate shipping for all my products, so irrespective of what or how many products are purchased the price is £7.50. I want to display this on the shopping cart page.

I have ZC 1.3.7 installed with no mods or payment modules.

Specifically, I want it to display:

  1. All my products, with their prices, underneath that
  2. The subtotal adding all these together (I know how to do this), underneath that
  3. The flat rate of P&P (I don't know how to do this), underneath that
  4. The total including P&P (I can work this out too)

Any help would be greatly appreciated.

8 Dec 2007, 5:58 PM
#2
jerusalem_spider avatar

jerusalem_spider

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Re: Add shipping total to shopping cart page

It's ok, ive worked it out.

require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
$flatRateShipping = $shipping_modules->quote('','flat');
$cartShippingCost = (float)($flatRateShipping[0]['methods'][0]['cost']);
$cartShowShipping = $currencies->format( $cartShippingCost );
$cartShowSubTotal = $currencies->format($_SESSION['cart']->show_total());
$cartShowTotal = $currencies->format( $cartShippingCost + (float)$_SESSION['cart']->show_total() );