Convert accessory collateral to JSON based accessory collateral.

Add a product with accessory collateral to loadProducts.pl to test the upgrade.
This commit is contained in:
Colin Kuskie 2008-05-04 17:15:02 +00:00
parent 4da1f8314f
commit 2215e55bcb
2 changed files with 33 additions and 7 deletions

View file

@ -98,7 +98,7 @@ my $product4 = $root->addChild($properties4);
my $properties5 = {
className => 'WebGUI::Asset::Wobject::Product',
url => 'four',
url => 'five',
price => 7.77,
title => 'extremely long title that will be truncated to only 30 chars in the variant',
description => 'fourth product',
@ -106,6 +106,19 @@ my $properties5 = {
my $product5 = $root->addChild($properties5);
my $propertiesa = {
className => 'WebGUI::Asset::Wobject::Product',
url => 'accessory Product',
price => 1.00,
title => 'accessory Product',
description => 'accessory Product',
};
my $producta = $root->addChild($propertiesa);
$session->db->write('insert into Product_accessory (assetId, accessoryAssetId, sequenceNumber) values (?,?,?)', [$producta->getId, $root->getId, 1]);
$session->db->write('insert into Product_accessory (assetId, accessoryAssetId, sequenceNumber) values (?,?,?)', [$producta->getId, WebGUI::Asset->getDefault($session)->getId, 2]);
$tag->commit;
diag "Done.";