I want to offer shipping to multiple zones, each zones can have multiple shipping options (first class, priority, ...)
Because of the type of my product, I need only a flat rate for each type, such as:
USA:
Total < 25
First Class: 3usd
Priority: 7usd
25<Total < 50
First Class: FREE
Priority: 4usd
Canada:
Total < 25
First Class: 5usd
Priority: 9usd
25<Total < 50
First Class: FREE
Priority: 6usd
etc....
I'm thinking of creating 3 additional tables like instead of stuffing everything into the configuration table:
$db->Execute("CREATE TABLE ". TABLE_FLEXIBLEZONE_METHODS ." (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL,
PRIMARY KEY (ID)
) ENGINE=MyISAM;");
$db->Execute("CREATE TABLE ". TABLE_FLEXIBLEZONE_COUNTRIES ." (
id int(10) NOT NULL auto_increment,
method_id int(10) unsigned NOT NULL,
country_id int(10) unsigned NOT NULL,
UNIQUE (method_id, country_id),
PRIMARY KEY (ID)
) ENGINE=MyISAM;");
$db->Execute("CREATE TABLE ". TABLE_FLEXIBLEZONE_RATES ." (
id int(10) NOT NULL auto_increment,
method_id int(10) unsigned NOT NULL,
minimum_total int(10) unsigned NOT NULL,
maximum_total int(10) unsigned NOT NULL,
cost int(10) unsigned NOT NULL,
PRIMARY KEY (ID)
) ENGINE=MyISAM;");
The bad things:
- it may slow down the site (but this is not necessarily true tho)
- When I want to edit shipping methods, I can't go to admin->modules->shipping but I may have to place a new page somewhere.
So, please give me some advices, should I do this, or is there any better way?
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me