PDA

View Full Version : 2 table rates



BrandonScottishRegalia
12-08-2008, 04:44 AM
Hello

I need some help and insight on shipping modules. We are based out of Canada and don't have any actual weights in the system so are basing shipping on price. We want to charge Canada with a table rate (works fine) but we also want US to have a table rate too. Is this possible? If so how would I do it?

Thanks
Brandon

jpf
12-08-2008, 06:11 PM
Yes you can..... COPY all of the table.php files - name to say tables_us.php

In all files - search for:
TABLE_

Rename to
TABLE_US_

In the language file you might want to change "Table Rate" to "Table U.S. Rate"

Then install it and use for only US zone.

Totallymumsandbubs
02-23-2009, 03:54 AM
Can I hijack this post and ask.. ... a q?

I want to do 2 table rates for my store. One for general post rate and one for express post. I use pre-paid bags so I know how much they are.

Can I do what was suggested above by JPF and get the table.php file(from catalog/includes/modules/shipping) and then just have 2 shipping options? Can I edit the new tables.php file to say its for express post?

jpf
02-23-2009, 05:18 AM
Yes - it should work - use the same ZONE and both should show up. Change text as needed. TABLE to say TABLE_EXP and the text in both to something more suitable.

gmancommerce
08-17-2009, 05:25 PM
Hi there,

I have followed the above steps and rename Table_ to Table_US,

However, when I load the shipping module page, it has the following error:

Fatal error: Cannot redeclare class table in /mnt/w0106/d07/s29/b026b7e1/www/abc/shopcart/catalog/includes/modules/shipping/table_us.php on line 13

Any idea?

Thanks

jpf
08-18-2009, 11:13 AM
There is no Table_ --- there is TABLE_

Do not change anything that is "table" to "Table_US" as it will break things.

Case is SENSITIVE and IMPORTANT. Make sure you copy all table.php files to table_us.php .

gmancommerce
08-19-2009, 04:29 PM
Thanks for the help

tdwuk
05-11-2010, 12:24 AM
Hi,
Can someone please clarify for me please, I want to create 2 table rates, one for normal Royal Mail small packages and one courier table rate.
If I have the existing table rate set up for Royal Mail do I just copy the file and rename the new one to table_2.php, then change the references from TABLE_ to TABLE_2_ and thats it? Do I need to add anything to the database?
Thanks

pgmarshall
05-11-2010, 12:43 AM
Which courier are you intending on using? Most of them have a shipping module which can easily be installed ...

Regards,

tdwuk
05-14-2010, 02:11 AM
Business post

tdwuk
05-14-2010, 02:52 AM
I tried one OSC contribution but it didn't work as expected...or I did it wrong. Just checked another thread here and found this osCommerce: Extra Table Rate (http://www.oscommerce.com/community/contributions,2371/category,2/search,table/page,3) going to try that.

mcornell
08-01-2010, 08:33 AM
Can this be used for seperate rates for Customer Groups ex. TABLE_ (for retail) TABLE_WH_ (for wholesale) and TABLE_CST_ for (cost) or is there a better way to implement seperate table rates for customer groups? retail is 10% of sub-total, wholesale is 19% and cost customers are paying 25% for the shipping charges.

Apologize for stepping on the thread.

Thanks

ridexbuilder
08-01-2010, 02:15 PM
If you don't find a suitable one in the osCommerce contributions site, then this should be easy to adapt:
http://info.ejsolutions.co.uk/oscmax/permalink/oscmax-international-table-rate-shipping-module/

mad_dexter
08-02-2010, 04:58 AM
If you don't find a suitable one in the osCommerce contributions site, then this should be easy to adapt:
http://info.ejsolutions.co.uk/oscmax/permalink/oscmax-international-table-rate-shipping-module/

This looks quite straight forward to implement but I need to use multiple tables for my shipping as each zone has different rates based on my selection of couriers and post as follows

1 table for europe zone 1
1 table for europe zone 2
1 table for usa
1 table for rest of the world

Can I therefore make multiple copies of the inttable.php 's and call them inttable1.php inttable2.php etc?

If so what else do I need to change in the code?

mcornell
08-02-2010, 05:34 AM
Yes you can..... COPY all of the table.php files - name to say tables_us.php

In all files - search for:
TABLE_

Rename to
TABLE_US_

In the language file you might want to change "Table Rate" to "Table U.S. Rate"

Then install it and use for only US zone.

I found an example on osCommerce (http://forums.oscommerce.com/topic/137263-shipping-duplicating-table-rate/) For the first table copy you would have to use oscMax's table.php (due to the mods) an manually search and replace table or TABLE with table2 or TABLE2. after that you could use search and replace after the name table is changed as there are some places the word table needs to be left alone.

Your article was a great help in pointing me in the right direction.

ridexbuilder
08-02-2010, 06:54 AM
Short answer: dunno, can't recall details, made that one up in a couple of hours, for a particular task.
Longer answer: Given the 4 zones, I should think that it'd be easier to produce a copy of the existing multi-zone table rate, naming it bizpost, for example.

['Snidey' answer: getting a bit sick of producing ad-hoc bits and pieces to the benefit of others, for no return. Not directed at any one particular person.
Goes off to see what other bits of core 'Max that I can break and maybe, finally get an upgrade done for one of my clients. ;)]

JavaBeanz
11-27-2010, 08:22 AM
Digging around in the 2.0.25 table.php, I am concerned that replacing everything TABLE_ is not the correct answer. As I find a couple of things that I don't think should be changed, but please correct me if I am wrong.

TABLE_ZONES_TO_GEO_ZONES
TABLE_CONFIGURATION

The above appear to be unrelated to the changes required.

Would it be more correct to say that the changes should be made only to those that have MODULE_SHIPPING_TABLE_ rather than just saying TABLE_ ?

ridexbuilder
11-27-2010, 09:28 AM
Digging around in the 2.0.25 table.php, I am concerned that replacing everything TABLE_ is not the correct answer. As I find a couple of things that I don't think should be changed, but please correct me if I am wrong.

TABLE_ZONES_TO_GEO_ZONES
TABLE_CONFIGURATION

The above appear to be unrelated to the changes required.

Would it be more correct to say that the changes should be made only to those that have MODULE_SHIPPING_TABLE_ rather than just saying TABLE_ ?
Is that not pretty obvious? Different tables for different purposes - though unsure why you're modifying table.php at all! (Much as I respect JPF, I find his method a bit convoluted for some shipping methods).
No additional tables are required, in terms of database structure - shipping tables (not database tables) are stored automagically in the configuration (database) table.
Perhaps if this is not clear to anyone reading this, then they should seek the assistance from someone else.

EJ

JavaBeanz
11-27-2010, 01:47 PM
Since this is apparently NOT the optimal method, can you suggest what is the best method?

We need the functionality of the price based tables, but we have difference zones to deal with. I had started looking at the 'MultiGeoZone MultiTable Shipping' that apparently Michael worked on, but I am not seeing where there is an osCMax 2.0.25 version of this module available.

And though it may be obvious to someone with a programming background, the instructions appear to suggest that ALL "TABLE_" need to be replaced, which is not the case. Not everyone reading such instructions will catch on to that issue.

What makes for a good software project, is something that can be used. What makes for a good open source software project, is something that can be intelligently modified to fit the needs of the users, and that implies sufficient documentation, with accurate information, whether it is in separate docs, or in the source as comments.

ridexbuilder
11-27-2010, 03:20 PM
What makes for a good software project, is something that can be used. What makes for a good open source software project, is something that can be intelligently modified to fit the needs of the users, and that implies sufficient documentation, with accurate information, whether it is in separate docs, or in the source as comments.
Yes, it would be 'nice' to get more volunteers producing documentation for the wiki.

Open Source doesn't necessarily mean that everything is handed to you on a silver platter. 'Max is built on oscommerce, mySQL, PHP, jquery etc., all with copious and readily available information/documentation. It is what is done with the information that produces the results. :wink:
With the massive changes in 2.5, I'm lost in quite a few key areas and will struggle to get to grips with some of the fancy new coding. This doesn't mean that the software is bad, just that it offers far more features, that I will have to read up on/experiment with/ask about.

The alternative shipping method that I offered in my link is not that difficult to decipher, nor adapt, though it may not suit your needs. Perhaps JPF will appear back at some point and explain further, or one of the other forum members might shed some light on that methodology.

EJ