fix: 6.99rc0 - shippingOptions not serialized
This commit is contained in:
parent
0212cdc044
commit
288be2c599
3 changed files with 17 additions and 6 deletions
|
|
@ -61,8 +61,10 @@
|
||||||
- Added new template vars to DataForm
|
- Added new template vars to DataForm
|
||||||
- fix: op=editSubscription causes fatal
|
- fix: op=editSubscription causes fatal
|
||||||
- fix: Commerce and groups
|
- fix: Commerce and groups
|
||||||
|
- fix: 6.99rc0 - shippingOptions not serialized
|
||||||
- fix: Orphaned asset data (modified test to fix bug in test)
|
- fix: Orphaned asset data (modified test to fix bug in test)
|
||||||
|
|
||||||
|
|
||||||
6.99.3
|
6.99.3
|
||||||
- Someone removed the status from the submission templates. That has been
|
- Someone removed the status from the submission templates. That has been
|
||||||
fixed.
|
fixed.
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,16 @@ fixSurvey($session);
|
||||||
fixEditWorkflow($session);
|
fixEditWorkflow($session);
|
||||||
fixOrphans();
|
fixOrphans();
|
||||||
updateHttpProxy();
|
updateHttpProxy();
|
||||||
|
fixShippingOptions();
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
sub fixShippingOptions {
|
||||||
|
print "\tRemoving unserialized shipping options data from the transaction table.\n";
|
||||||
|
$session->db->write("update transaction set shippingOptions = null where shippingOptions like '%HASH%'");
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub updateHttpProxy {
|
sub updateHttpProxy {
|
||||||
print "\tAllowing HTTP Proxy to use ampersands in addition to semicolons in URLs.\n" unless ($quiet);
|
print "\tAllowing HTTP Proxy to use ampersands in addition to semicolons in URLs.\n" unless ($quiet);
|
||||||
|
|
@ -64,6 +71,7 @@ sub fixSurvey{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
sub fixEditWorkflow {
|
sub fixEditWorkflow {
|
||||||
my @goodPlugins;
|
my @goodPlugins;
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ package WebGUI::Commerce::Transaction;
|
||||||
use strict;
|
use strict;
|
||||||
use WebGUI::SQL;
|
use WebGUI::SQL;
|
||||||
use WebGUI::Commerce::Payment;
|
use WebGUI::Commerce::Payment;
|
||||||
|
use JSON;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -553,8 +554,8 @@ Returns the shipping options for this transaction. If options is supplied the sh
|
||||||
be set to it.
|
be set to it.
|
||||||
|
|
||||||
=head3 options
|
=head3 options
|
||||||
If supplied the shipping options of the transaction will be set to this value. This should probably
|
If supplied the shipping options of the transaction will be set to this value. The value passed will
|
||||||
be some serialized datastructure.
|
be serialized/un-serialized for you.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
@ -563,12 +564,12 @@ sub shippingOptions {
|
||||||
$self = shift;
|
$self = shift;
|
||||||
$shippingOptions = shift;
|
$shippingOptions = shift;
|
||||||
|
|
||||||
if ($shippingOptions) {
|
if (scalar (keys %{$shippingOptions})) {
|
||||||
$self->{_properties}{shippingOptions} = $shippingOptions;
|
$self->{_properties}{shippingOptions} = objToJson($shippingOptions);
|
||||||
$self->session->db->write("update transaction set shippingOptions=".$self->session->db->quote($shippingOptions)." where transactionId=".$self->session->db->quote($self->{_transactionId}));
|
$self->session->db->write("update transaction set shippingOptions=? where transactionId=?",[$self->{_properties}{shippingOptions},$self->{_transactionId}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $self->{_properties}{shippingOptions};
|
return jsonToObj($self->{_properties}{shippingOptions});
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue