Copy/clone of TABLE shipping module 1.3.7
Hi, I would like to make a copy of shipping module TABLE e.g. TABLE1 and TABLE2.
How can I do it ? I think to make a copy of:
\includes\languages\MY LANGUAGE\modules\shipping\table.php
\includes\modules\shipping\table.php
rename these files and make some changes in \includes\modules\shipping\table1.php
but I still can not find, what I have to change in this file.
Can anybody help me, please ?
Re: Copy/clone of TABLE shipping module 1.3.7
You are cloning the 2 files:
/includes/modules/shipping/table.php
/includes/languages/english/modules/shipping/table.php
to the files:
/includes/modules/shipping/table1.php
/includes/languages/english/modules/shipping/table1.php
Change all words:
table to table1
TABLE to TABLE1
NOTE: These are case sensative ...
WARNING: Do NOT change anything that starts with the word TABLE_ as this is a physical table in the database ...
Test ... table1 ... does it work?
If so, now clone table1.php files to table2.php files looking for the words:
table1
TABLE1
as those will help skip the database TABLE_ references ...
Let us know how it goes ...
1 Attachment(s)
Re: Copy/clone of TABLE shipping module 1.3.7
Thank yuo very much. I tried the TABLE1 module and it looks it works OK,.
Only one small mistake - you can see it in the picture (sorry it is in czech). It is not possible to see the sort order by "Česká pošta 2 -table1", but in the detail of "Česka pošta 2 -table1" you can see it. Also, in the shop the sort order does not work, because the "Česka pošta 2" is in tle last possition and has to be the second one.
I also do not understand why it is RED and "Česka pošta - table" and Store pickup is YELLOW.
Re: Copy/clone of TABLE shipping module 1.3.7
Red is not installed ...
Yellow is installed with either:
1 Zones
2 Not configured correctly (this only tests obvious things)
Green is installed ...
Re: Copy/clone of TABLE shipping module 1.3.7
OK, and do you know what to do with the SORT ORDER PROBLEM ?
Re: Copy/clone of TABLE shipping module 1.3.7
Install the other module and set the sort order?
Re: Copy/clone of TABLE shipping module 1.3.7
Thanks a lot, it is OK now. I reinstalled all shipping modules and it is OK.
Now, I have just one question. It is possible to have two different prices for cash on delivery fee ?
e.g.
CZECH POST (shipping module TABLE)
1kg pack e.g. 100 CZK + cash on delivery fee 30 CZK
or
DHL (shipping module TABLE1
1kg pack e.g. 120 CZK + cash on delivery fee 50 CZK
SO, what I would like to se up is:
If customer select CZECH POST with cash on delivery the price will be plus 30CZK
or If the customer select DHL with cash on delivery then the price will be +50 CZK.
Re: Copy/clone of TABLE shipping module 1.3.7
This is built into the Modules ... Order Totals ... COD Fee ot_cod
You will need to look at how this file handles this and recode to include the new tables and uninstall and reinstall and reconfigure ...
Re: Copy/clone of TABLE shipping module 1.3.7
So, I try to use ship2pay modul. It looks fine. I have the shipping&payments combination I need:
Czech post pack - pay: czech post COD, money order
Czech post business pack - pay: czech post COD, money order
PPL pack - pay: PPL COD, money order
store pickup - pay: cash, money order
but I have problem with the COD fee, because it is not add to total price for shipping:
I use this configuration:
Shipping modules
Modul TABLE - Czech post pack
Modul TABLE1 - Czech post business pack
Modul TABLE2 - PPL pack
Payments
Modul COD - czech post COD
Modul COD1- PPL COD
Modul COD2- cash payment
Order total
Modul ot_cod_fee - COD fee
I am not sure if I have to make copy of ot_cod_fee and create from this module ot_cod1_fee for PPL COD fee ???
May be I have some mistake in COD1 and COD2 modules copied from COD module, but the fee for COD module also does not work ?
Re: Copy/clone of TABLE shipping module 1.3.7
I would have to sit down and write the code for looking into adding the additional shipping modules ...
The best I can tell you in order to do this yourself is to look at how table is added and clone its settings for your new one ... if it is hard to follow, trace how flat is done to follow the code for this ...
Re: Copy/clone of TABLE shipping module 1.3.7
Ajeh, thanks for your quick answer. I am not sure I understand well what you mean with the flat shipping module.
Do you think that I can rename and clone my shipping module TABLE2 to FLAT and chnage the table to to flat and TABLE2 to FLAT and try to use the COD for FLAT in ot_cod_fee module ?
Re: Copy/clone of TABLE shipping module 1.3.7
I have got it. It works correctly thanks to your consultation.
The solution is here:
open file include/modules/order_total/ot_cod_fee.php
find the line with code:
if (substr_count($_SESSION['shipping']['id'], 'table') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_TABLE);
and under the code insert this code:
if (substr_count($_SESSION['shipping']['id'], 'table2') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_TABLE2);
then find the first occurence of this code
'MODULE_ORDER_TOTAL_COD_FEE_TABLE',
and behalf this code and infront of that code
'MODULE_ORDER_TOTAL_COD_FEE_UPS',
insert this code
'MODULE_ORDER_TOTAL_COD_FEE_TABLE2',
then find this line:
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for TABLE', 'MODULE_ORDER_TOTAL_COD_FEE_TABLE', 'AT:3.00,DE:3.58,00:9.99', 'TABLE: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '5', now())");
and under this line insert this code:
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for TABLE2', 'MODULE_ORDER_TOTAL_COD_FEE_TABLE2', 'AT:3.00,DE:3.58,00:9.99', 'TABLE: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '6', now())");
After this we have to change +1 the second value between the code …..(not possible)', and , now())"); in all lines under our inserted line e.g..:
…..(not possible)', '6', '7', now())"); change to ….. (not possible)', '6', '8', now())");
…..(not possible)', '6', '8', now())"); change to….. (not possible)', '6', '9', now())");
…..(not possible)', '6', '9', now())"); change to….. (not possible)', '6', '10', now())");
etc.
then we have to run this sql code in admin:
INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (999, 'COD Fee for TABLE2', 'MODULE_ORDER_TOTAL_COD_FEE_TABLE2', 'CZ:56', 'TABLE2: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', 6, 6, NULL, '2007-03-06 20:50:29', NULL, NULL);
.... and that is all :thumbsup:
It tooks me one week :lamo:
Re: Copy/clone of TABLE shipping module 1.3.7
eazy smeazy eh?! :lamo:
Thanks for posting the update that worked for you on adding a new shipping module to the COD Fee Orders Total Module ... :smile:
Re: Copy/clone of TABLE shipping module 1.3.7
I have the instalation package but only in czech. If I have a few minutes time I try to translate it to english and change the languages file eg. table.php, table2.php to "neutral" shipping modules called again TABLE, TABLE2 etc.
Re: Copy/clone of TABLE shipping module 1.3.7
Quote:
Originally Posted by
Ajeh
You are cloning the 2 files:
/includes/modules/shipping/table.php
/includes/languages/english/modules/shipping/table.php
to the files:
/includes/modules/shipping/table1.php
/includes/languages/english/modules/shipping/table1.php
Change all words:
table to table1
TABLE to TABLE1
NOTE: These are case sensative ...
WARNING: Do NOT change anything that starts with the word TABLE_ as this is a physical table in the database ...
Test ... table1 ... does it work?
If so, now clone table1.php files to table2.php files looking for the words:
table1
TABLE1
as those will help skip the database TABLE_ references ...
Let us know how it goes ...
Ajeh,
Does this force the cutomer to their own country rate, cause I am having trouble with some customers, picking the "best" rate. One from Canada, can see the other rates, and chooses the cheapest. The same goes with a customer in the UK.
I currently have table rate set up (default):
http://www.bullfightstore.com/images/table01.jpg
Zone Rates
http://www.bullfightstore.com/images/zone01.jpg
You know just thought about something, should I disable the default table rates and just use the Zone rates? Or should make a couple clones?
Just getting tired of customers choosing the "cheapest rate"!
Gerry
Re: Copy/clone of TABLE shipping module 1.3.7
If you use Table Rate clones for various countries ... you need to build Zones for them so you can filter who sees which one ...
One image you show is Table Rate table with no Zone setting and a clone turned off ...
The other image is Zone Rate zones ... and on Zone you have US set for the Skip and for Zone 1 ... :huh:
Re: Copy/clone of TABLE shipping module 1.3.7
Quote:
Originally Posted by
Ajeh
If you use Table Rate clones for various countries ... you need to build Zones for them so you can filter who sees which one ...
One image you show is Table Rate table with no Zone setting and a clone turned off ...
The other image is Zone Rate zones ... and on Zone you have US set for the Skip and for Zone 1 ... :huh:
Yeah, the one clone turned off was a test, from a thread posted about making changes to table Table, etc, but cannot find that thread, it had someome from Mexico talking about that!
My primary customers right now are US, CA, and UK, so I would like to have that as is, but which should I use? I also have Free shipping with orders >$45.
The table rates were for the US only, then the zone rates were for everywhere else, but I see both the CA and UK customers choosing Table Rate and "Best Way".
Should I make clones for each Country? or Just use Zone Rates. Another problem I may see is I dont want those in other countries to get the Free option, or add a handling fee.
Thanks
Re: Copy/clone of TABLE shipping module 1.3.7
If you uninstall Zone Rate and edit the module:
/includes/modules/shipping/zones.php
And change the number of Zones to 4 ... then setup US, CA, GB and 00 ... where 00 means everyone else ...
NOTE: UK is GB not UK ...
Re: Copy/clone of TABLE shipping module 1.3.7
Quote:
Originally Posted by
Ajeh
If you uninstall Zone Rate and edit the module:
/includes/modules/shipping/zones.php
And change the number of Zones to 4 ... then setup US, CA, GB and 00 ... where 00 means everyone else ...
NOTE: UK is GB not UK ...
ah ok, didnt know you can do that, will do it now.
Thanks,
Gerry
Re: Copy/clone of TABLE shipping module 1.3.7
Hi,
You have written a very good post about cloning the table shipping module. It seems to work on my cart. I have created an EXPRESS shipping module using the name TABLE_EXPRESS. It shows up fine on step 1 of checkout process, but when it goes to step 2, it shows up the original module pricing and wording - NORMAL shipping and the price is the NORMAL shipping price as well. Can anyone help me and see why it's doing that?
Thanks.
Tyrone.