fix the same JSON encoding issues with the Sku Product during upgrades
This commit is contained in:
parent
91317dfdd7
commit
631bade4f6
2 changed files with 10 additions and 10 deletions
|
|
@ -1225,7 +1225,7 @@ EOSQL1
|
||||||
while (my $acc = $accessorySth->hashRef()) {
|
while (my $acc = $accessorySth->hashRef()) {
|
||||||
push @accessories, $acc;
|
push @accessories, $acc;
|
||||||
}
|
}
|
||||||
my $accJson = to_json(\@accessories);
|
my $accJson = encode_json(\@accessories);
|
||||||
$session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]);
|
$session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]);
|
||||||
|
|
||||||
##Related
|
##Related
|
||||||
|
|
@ -1234,7 +1234,7 @@ EOSQL1
|
||||||
while (my $acc = $relatedSth->hashRef()) {
|
while (my $acc = $relatedSth->hashRef()) {
|
||||||
push @related, $acc;
|
push @related, $acc;
|
||||||
}
|
}
|
||||||
my $relJson = to_json(\@related);
|
my $relJson = encode_json(\@related);
|
||||||
$session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]);
|
$session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]);
|
||||||
|
|
||||||
##Specification
|
##Specification
|
||||||
|
|
@ -1243,7 +1243,7 @@ EOSQL1
|
||||||
while (my $spec = $specificationSth->hashRef()) {
|
while (my $spec = $specificationSth->hashRef()) {
|
||||||
push @specification, $spec;
|
push @specification, $spec;
|
||||||
}
|
}
|
||||||
my $specJson = to_json(\@specification);
|
my $specJson = encode_json(\@specification);
|
||||||
$session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]);
|
$session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]);
|
||||||
|
|
||||||
##Feature
|
##Feature
|
||||||
|
|
@ -1252,7 +1252,7 @@ EOSQL1
|
||||||
while (my $feature = $featureSth->hashRef()) {
|
while (my $feature = $featureSth->hashRef()) {
|
||||||
push @features, $feature;
|
push @features, $feature;
|
||||||
}
|
}
|
||||||
my $featJson = to_json(\@features);
|
my $featJson = encode_json(\@features);
|
||||||
$session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]);
|
$session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]);
|
||||||
|
|
||||||
##Benefit
|
##Benefit
|
||||||
|
|
@ -1261,7 +1261,7 @@ EOSQL1
|
||||||
while (my $benefit = $benefitSth->hashRef()) {
|
while (my $benefit = $benefitSth->hashRef()) {
|
||||||
push @benefits, $benefit;
|
push @benefits, $benefit;
|
||||||
}
|
}
|
||||||
my $beneJson = to_json(\@benefits);
|
my $beneJson = encode_json(\@benefits);
|
||||||
$session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]);
|
$session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1110,7 +1110,7 @@ EOSQL1
|
||||||
while (my $acc = $accessorySth->hashRef()) {
|
while (my $acc = $accessorySth->hashRef()) {
|
||||||
push @accessories, $acc;
|
push @accessories, $acc;
|
||||||
}
|
}
|
||||||
my $accJson = to_json(\@accessories);
|
my $accJson = encode_json(\@accessories);
|
||||||
$session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]);
|
$session->db->write('update Product set accessoryJSON=? where assetId=?',[$accJson, $assetId]);
|
||||||
|
|
||||||
##Related
|
##Related
|
||||||
|
|
@ -1119,7 +1119,7 @@ EOSQL1
|
||||||
while (my $acc = $relatedSth->hashRef()) {
|
while (my $acc = $relatedSth->hashRef()) {
|
||||||
push @related, $acc;
|
push @related, $acc;
|
||||||
}
|
}
|
||||||
my $relJson = to_json(\@related);
|
my $relJson = encode_json(\@related);
|
||||||
$session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]);
|
$session->db->write('update Product set relatedJSON=? where assetId=?',[$relJson, $assetId]);
|
||||||
|
|
||||||
##Specification
|
##Specification
|
||||||
|
|
@ -1128,7 +1128,7 @@ EOSQL1
|
||||||
while (my $spec = $specificationSth->hashRef()) {
|
while (my $spec = $specificationSth->hashRef()) {
|
||||||
push @specification, $spec;
|
push @specification, $spec;
|
||||||
}
|
}
|
||||||
my $specJson = to_json(\@specification);
|
my $specJson = encode_json(\@specification);
|
||||||
$session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]);
|
$session->db->write('update Product set specificationJSON=? where assetId=?',[$specJson, $assetId]);
|
||||||
|
|
||||||
##Feature
|
##Feature
|
||||||
|
|
@ -1137,7 +1137,7 @@ EOSQL1
|
||||||
while (my $feature = $featureSth->hashRef()) {
|
while (my $feature = $featureSth->hashRef()) {
|
||||||
push @features, $feature;
|
push @features, $feature;
|
||||||
}
|
}
|
||||||
my $featJson = to_json(\@features);
|
my $featJson = encode_json(\@features);
|
||||||
$session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]);
|
$session->db->write('update Product set featureJSON=? where assetId=?',[$featJson, $assetId]);
|
||||||
|
|
||||||
##Benefit
|
##Benefit
|
||||||
|
|
@ -1146,7 +1146,7 @@ EOSQL1
|
||||||
while (my $benefit = $benefitSth->hashRef()) {
|
while (my $benefit = $benefitSth->hashRef()) {
|
||||||
push @benefits, $benefit;
|
push @benefits, $benefit;
|
||||||
}
|
}
|
||||||
my $beneJson = to_json(\@benefits);
|
my $beneJson = encode_json(\@benefits);
|
||||||
$session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]);
|
$session->db->write('update Product set benefitJSON=? where assetId=?',[$beneJson, $assetId]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue