Zen Cart Logo
Forums / Addon Shipping Modules / Shipping Rates in Cart [support thread]

Shipping Rates in Cart [support thread]

Views: 30,243

Results 21 to 40 of 96
15 May 2009, 3:58 PM
#21
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Shipping Rates in Cart [support thread]

nope still not working correct, the fix above fixed the problem with displaying the shopping cart but when you go to check out i get the following error

Fatal error: Cannot redeclare class order in /home/public_html/store/includes/classes/order.php on line **987

if i turn the sidebox shipping off, then the problem goes!!!
**

15 May 2009, 9:28 PM
#22
steven300 avatar

steven300

Totally Zenned

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

Re: Shipping Rates in Cart [support thread]

Yes I can replicate this (although with less obvious symptoms). I don't have a fix for it as of yet. I'll see if I can figure it out but what I may end up doing is, in the next version, disabling the sidebox from the shopping cart page onwards.

3 Jun 2009, 12:43 PM
#23
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

ive just installed the mod on a new fresh install of 1.3.8a and for somereason its displaying the shipping cost without VAT

if i log in as a UK customer it shows the VAT on the mod but not when not loged in.

im using the flat rate shipping modual.

any ideas why its not added the VAT when not logged in?? products are showing inc vat

23 Jun 2009, 11:56 AM
#24
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

kitcorsa.. how did you get the VAT to display on this module? I'm having trouble finding out how to do this.

23 Jun 2009, 12:11 PM
#25
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

eerrrmmm i cant remember but i think it was a localisation problem and vat settings not correct, not a problem with the contribution.

23 Jun 2009, 12:46 PM
#26
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

kitcorsa:

eerrrmmm i cant remember but i think it was a localisation problem and vat settings not correct, not a problem with the contribution.

Ah, ok.

It's just that I'm trying to get the total displayed with VAT added in on this module. I just can't work out how it's done!

Thanks for your help anyway :smile:

23 Jun 2009, 1:12 PM
#27
steven300 avatar

steven300

Totally Zenned

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

Re: Shipping Rates in Cart [support thread]

I haven't tested this yet and it may not work for downloadable or virtual products.

In includes/templates/your_template/templates/tpl_shopping_cart_default.php

Find:

$sric_total = $cartSricTotal + $sric_shipping_simple;

Directly below it, add these two lines:

$vat = ($sric_total / 100) * 15;
$sric_total = $sric_total + $vat;
23 Jun 2009, 1:16 PM
#28
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

Steven300:

I haven't tested this yet and it may not work for downloadable or virtual products.

In includes/templates/your_template/templates/tpl_shopping_cart_default.php

Find:

$sric_total = $cartSricTotal + $sric_shipping_simple;

> 
> Directly below it, add these two lines:
> ```php
$vat = ($sric_total / 100) * 15;
$sric_total = $sric_total + $vat;

Hey steven, thanks for the reply.

I was considering heading that direction (manually working out the VAT deduction) but it causes some issues.

If I implement that code, the total displayed on the mod differs from the total displayed in the cart, by a penny.

For example, the order I'm testing right now, the mod displays it like - Total: £35.08, but the Zen shopping cart displays it like** Total: £35.07**

I'm guessing ZC uses a different method of rounding up the sum.

Thanks though!

23 Jun 2009, 2:58 PM
#29
thomasharding avatar

thomasharding

Zen Follower

Join Date:
Sep 2007
Location:
Manchester, England
Posts:
168
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

RIGHT, I've sorted it.

It turns out that PHP5 (which we run locally) rounds up numbers slightly different to PHP4 (which we run on our shared servers).

So essentially, your way worked fine, but only in PHP4. In PHP5, it misses a penny out.

Thanks for your help, this has been an immensely helpful module :smile:

24 Jun 2009, 6:06 PM
#30
ethical avatar

ethical

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

nice little mode, pretty easay to install however I am getting the following error at the bottom of the cart page (using 1.3.8a zen)

Fatal error: Cannot redeclare class shipping in /store/includes/classes/shipping.php on line 178

any thoughts on fixing this?

thanks

john

24 Jun 2009, 6:33 PM
#31
ethical avatar

ethical

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

ok well I solved it by setting the shipping estimator display settings to 0.

24 Jun 2009, 7:51 PM
#32
steven300 avatar

steven300

Totally Zenned

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

Re: Shipping Rates in Cart [support thread]

Yes, as you found out, the contribution uses the same code as the estimator, so if both pieces of code exist at the same time, an error will likely occur. Glad you discovered this and got it sorted :smile:

24 Jun 2009, 11:49 PM
#33
ethical avatar

ethical

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

ok i've got one other issue. It seems that when I add an item that has an one time extra fee (which is an extra shipping fee) but no shipping otherwise with a product that should be charged for shipping, the shipping rate goes to zero but it should be still charged for the one item.

I supposed this could be an inherent flaw with the cart shipping itself, and not the module but i've just noticed it now so wondering in anyone has any thoughts.

thanks

25 Jun 2009, 1:42 PM
#34
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

does the shipping estimate show one time charges?

25 Jun 2009, 2:09 PM
#35
steven300 avatar

steven300

Totally Zenned

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

Re: Shipping Rates in Cart [support thread]

I'm not sure. Are you referring to the contribution or the core estimator or both?

25 Jun 2009, 4:02 PM
#36
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

the core one, just replying to ethicals post

26 Jun 2009, 12:30 AM
#37
ethical avatar

ethical

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

hmm, well i've fixed part of it, i think it has something to do with the zen cart not this module. Right now i still have the program charging shipping on the extra charge for the product even though that product is set for free shipping.

pretty sure its nothing to do with your mod, so thanks for your time, but of course if you have any thoughts, its appreciated.

2 Jul 2009, 7:44 PM
#38
peter777 avatar

peter777

New Zenner

Join Date:
Jun 2009
Location:
United States
Posts:
4
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

Hi,

I've read all the posts in this thread and can't seem to find the answer.

I've installed the Shipping Rates in Cart contribution on a clean install of Zen Cart v. 1.3.8a (no modifications) and got a bunch of code displaying on the shopping cart page (see pic). I am running Zen Cart on a local server (Wamp)and unfortunately don't have a link to the live website. Any ideas what might be causing this?

The code displayed on the shopping cart page is coming from includes/templates/template_default/templates/tpl_shopping_cart_default.php The code shown is:

format(zen_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])); //Without currency symbol $sric_shipping_simple = $currencies->format(zen_add_tax($quotes[$i]['methods'][0]['cost'], $quotes[$i]['tax'])); } } } //Display currency code in cart if (SRIC_DISPLAY_CURRENCY_CODE == 'Yes, before price') { $currency_code_opt_before = $_SESSION['currency'] . " "; $currency_code_opt_after = ''; $currency_code_opt_total_before = $_SESSION['currency'] . " "; $currency_code_opt_total_after = ''; } else if (SRIC_DISPLAY_CURRENCY_CODE == 'Yes, after price') { $currency_code_opt_before = ''; $currency_code_opt_after = " " . $_SESSION['currency']; $currency_code_opt_total_before = ''; $currency_code_opt_total_after = " " . $_SESSION['currency']; } else if (SRIC_DISPLAY_CURRENCY_CODE == 'Yes, before price, for total only') { $currency_code_opt_before = ''; $currency_code_opt_after = ''; $currency_code_opt_total_before = $_SESSION['currency'] . " "; $currency_code_opt_total_after = ''; } else if (SRIC_DISPLAY_CURRENCY_CODE == 'Yes, after price, for total only') { $currency_code_opt_before = ''; $currency_code_opt_after = ''; $currency_code_opt_total_before = ''; $currency_code_opt_total_after = " " . $_SESSION['currency']; } else { $currency_code_opt_before = ''; $currency_code_opt_after = ''; $currency_code_opt_total_before = ''; $currency_code_opt_total_after = ''; } //Calculate total $cartSricTotal = preg_replace ( '#\D*?(\d+(\.\d+)?)\D*#', '$1', $cartShowTotal ); $sric_shipping_simple = preg_replace ( '#\D*?(\d+(\.\d+)?)\D*#', '$1', $sric_shipping_simple ); $sric_total = $cartSricTotal + $sric_shipping_simple; $sric_total = number_format($sric_total,2); //If no shipping charge if ( ($sric_shipping == '') && (SRIC_NO_SHIP == 'Display zero shipping price') ) { $sric_shipping = $currency_symbol . "0.00"; ?> 

Thanks in advance for any ideas/solutions

2 Jul 2009, 8:04 PM
#39
steven300 avatar

steven300

Totally Zenned

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

Re: Shipping Rates in Cart [support thread]

I just tested the mod on my WAMP install and I get the exact same problem.

However it works absolutely fine when online.

Not yet sure why that is.

2 Jul 2009, 10:15 PM
#40
peter777 avatar

peter777

New Zenner

Join Date:
Jun 2009
Location:
United States
Posts:
4
Plugin Contributions:
0

Re: Shipping Rates in Cart [support thread]

Thanks Steven :D Just tested the mod online (as opposed to a local server/Wamp) and it works perfectly :clap: