Add an option to the Sku to require individual shipping of this sku, separate
from other items in the cart. Update the FlatRate driver to support calculating that.
This commit is contained in:
parent
e98fc02e9b
commit
db290f91f9
8 changed files with 141 additions and 14 deletions
|
|
@ -41,6 +41,8 @@ turnOffAdmin($session);
|
|||
|
||||
correctEventTemplateVariables($session);
|
||||
|
||||
addShipsSeparateToSku($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -159,7 +161,6 @@ sub correctEventTemplateVariables {
|
|||
});
|
||||
|
||||
TEMPLATE: while (my $templateAsset = $getATemplate->()) {
|
||||
print("\t\t Correcting ". $templateAsset->getTitle. "\n") unless $quiet;
|
||||
my $template = $templateAsset->get('template');
|
||||
$template =~ s{<tmpl_var url>\?func=edit}{<tmpl_var urlEdit>}isg;
|
||||
$template =~ s{<tmpl_var url>\?func=delete}{<tmpl_var urlDelete>}isg;
|
||||
|
|
@ -172,6 +173,15 @@ sub correctEventTemplateVariables {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub addShipsSeparateToSku {
|
||||
my ($session) = @_;
|
||||
print "\tAdd shipsSeparate property to Sku... " unless $quiet;
|
||||
$session->db->write(<<EOSQL);
|
||||
ALTER TABLE sku ADD COLUMN shipsSeparately tinyint(1) NOT NULL
|
||||
EOSQL
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue