Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Cloned Table Rate Module "Loops"

Cloned Table Rate Module "Loops"

Locked

Views: 1,129

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
14 Jun 2007, 9:46 PM
#1
trippy1976 avatar

trippy1976

New Zenner

Join Date:
Nov 2005
Posts:
43
Plugin Contributions:
0

Cloned Table Rate Module "Loops"

I thought I got all the little spots in the files, but maybe not.

I took the table.php file in

includes/modules/shipping/

and

includes/languages/english/modules/shipping

and copied it to table_canada.php

Then I changed all instances of MODULE_SHIPPING_TABLE* and replaced them with MODULE_SHIPPING_TABLECANADA* preserving the install stuff.

This seems to work fine. I then set up my zones so you see this Canada rate only if you're in Canada. Awesome.

EXCEPT - during checkout, you select it and hit continue and it just loops you back to the screen to select a shipping option.

If I set it up so both table rates are viewable, it still selects the main table.php one, even if the table_canada.php display is chosen. This leads me to believe I have missed a replacement that's important for setting a session variable and it's still using the name or something from the original table.php version so it "bounces" back (without error, BTW) to the page to select the shipping.

14 Jun 2007, 9:53 PM
#2
trippy1976 avatar

trippy1976

New Zenner

Join Date:
Nov 2005
Posts:
43
Plugin Contributions:
0

Re: Cloned Table Rate Module "Loops"

$this->code = 'table_canada';

I think this line of code is probably the issue. Will search but meanwhile...

14 Jun 2007, 9:57 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Cloned Table Rate Module "Loops"

MODULE_SHIPPING_TABLECANADA*

Shouldn't this be MODULE_SHIPPING_TABLE_CANADA*? Or was that just a forum typo?

14 Jun 2007, 10:23 PM
#4
trippy1976 avatar

trippy1976

New Zenner

Join Date:
Nov 2005
Posts:
43
Plugin Contributions:
0

Re: Cloned Table Rate Module "Loops"

As long as MODULE_SHIPPING_TABLECANADA* matches in the module and language file - I think it's fine or should be. Those are (from what I can tell) mappings to the language file. These seem to be working without issue as the text that appears (and price displayed) are correct. When you submit the form, it loops back. This leads me to believe that it's something with the form creation.

16 Jun 2007, 1:59 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Cloned Table Rate Module "Loops"

table.php does not go to table_canada.php ...

It will go to: tablecanada.php

table does not go to table_canada ...

It will go to tablecanada

TABLE does not go to TABLE_CANADA ...

It will go to TABLECANADA

MODULE_SHIPPING_TABLE_ZONE will not go to MODULE_SHIPPING_TABLE_CANADA_ZONE ...

It will go to MODULE_SHIPPING_TABLECANADA_ZONE

The problem is ... table conflicts with table_canada ...

The solution is ... table does not conflict with tablecanada ... :cool:

NOTE: leave everything that starts with the word: TABLE_ (as in a database table name and not part of the shipping module naming convention so to speak) alone ...