Zen Cart Logo
Forums / General Questions / Display Shipping Cost

Display Shipping Cost

Locked

Views: 3,752

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
13 May 2009, 10:05 PM
#1
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Display Shipping Cost

I have been looking for a way to display the shipping cost on shopping cart page, I understand that shipping estimator will display the shipping fee but I want to add the shipping to the table under the Sub-total then add another line to display the actual total (sub-total+shipping). Since the US is the default country all the shipping cost will be displayed as US if the customer change the country then the total will change to reflect that.

In the next step I want to display the sub-total, shipping and total in the header of the site. simillar to this site:
http://www.business-supply.com/

13 May 2009, 10:56 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Display Shipping Cost

Check out the SRiC link in my signature.

13 May 2009, 11:31 PM
#3
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Display Shipping Cost

Thanks Steven
I noticed that a lot of people are asking for this. I am glad you find the time to code it. I will give it a try on my new site.
It worked like a charme for the shopping cart page

13 May 2009, 11:42 PM
#5
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Display Shipping Cost

Here is another question for you. I want to display the sub-total, shipping and total in the header. So if the cart is empty it will show 0 for all the fields but when there is something in the cart it will display the total. Now i managed to display the cart total in the header when there is products in the cart and display "Shopping Cart Empty" when the cart is empty can I do the same for the shipping and total? Is it possible to add an if statement?

13 May 2009, 11:57 PM
#6
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Display Shipping Cost

I just thought of a way but I will need your feedback.

I am thinking about creating an if statement to display:
Shopping cart is empty
sub-total: $0.00
shipping: $0.00
total: $0.00

and once a customer add product I can display the result from your mod. I am looking at the sidebox code which part of the code will I need to copy in the if statement, also I want to style the result, what is the shortest way to do it. I want it to be displayed all the time so I will not care much about the admin control.

14 May 2009, 12:27 AM
#7
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Display Shipping Cost

As a minimum, you will need:

lines 51-66 to get the currency symbol

lines 68-69 to include the logic

lines 71-84 to work out the shipping rate

line 114 to get the sub-total

lines 116-120 to work out the total

Then it's up to you to style and display the following variables:

$cartShowTotal
$sric_shipping
$sric_total

You will need to display $currency_symbol just before displaying $sric_total

14 May 2009, 12:30 AM
#8
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Display Shipping Cost

if ($_SESSION['cart']->count_contents() == 0) {
echo "Shopping cart is empty";
echo "<br />";
echo "sub-total: $0.00";
echo "<br />";
echo "shipping: $0.00";
echo "<br />";
echo "total: $0.00";
} else {
//code from above post
}
27 May 2009, 10:39 PM
#9
droidwork avatar

droidwork

New Zenner

Join Date:
Mar 2008
Posts:
20
Plugin Contributions:
0

Re: Display Shipping Cost

is there a way to show the shipping rate in order and invoice?

28 May 2009, 3:18 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display Shipping Cost

See your other post on same subject ... just post a question once and not in multiple locations ... if you still need an answer, add on to your original thread ...
http://www.zen-cart.com/forum/showthread.php?p=733963#post733963

28 May 2009, 9:28 PM
#11
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: Display Shipping Cost

I wonder if this mod could be used as a base somehow but change the display and logic for sales tax?

4 Jun 2009, 5:21 PM
#12
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: Display Shipping Cost

Could this be done?

1 Jul 2009, 6:11 PM
#13
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: Display Shipping Cost

I may have asked this before i am not sure, is it possible to have the shipping estimator show up on the product information page so that the customer can get a idea of how much the shipping will cost before adding the item to the cart?

Like this page

http://www.beachaudio.com/Royal/29297w-p-279543.html?utm_source=froogle&utm_medium=cpc&utm_campaign=29297w&utm_content=atr

Thanks