convert specification collateral to JSON
This commit is contained in:
parent
62e7b50ad1
commit
52d29d90e4
3 changed files with 68 additions and 32 deletions
|
|
@ -127,11 +127,33 @@ my $propertiesr = {
|
|||
description => 'related Product',
|
||||
};
|
||||
|
||||
my $productr = $root->addChild($propertiesa);
|
||||
my $productr = $root->addChild($propertiesr);
|
||||
|
||||
$session->db->write('insert into Product_related (assetId, relatedAssetId, sequenceNumber) values (?,?,?)', [$productr->getId, $product4->getId, 1]);
|
||||
$session->db->write('insert into Product_related (assetId, relatedAssetId, sequenceNumber) values (?,?,?)', [$productr->getId, $product5->getId, 2]);
|
||||
|
||||
my $propertiess = {
|
||||
className => 'WebGUI::Asset::Wobject::Product',
|
||||
url => 'specification_Product',
|
||||
price => 3.33,
|
||||
title => 'specification Product',
|
||||
description => 'specification Product',
|
||||
};
|
||||
|
||||
my $products = $root->addChild($propertiess);
|
||||
|
||||
$products->setCollateral('Product_specification', 'Product_specificationId', {
|
||||
name => 'pitch',
|
||||
value => '440',
|
||||
units => 'Hertz',
|
||||
});
|
||||
|
||||
$products->setCollateral('Product_specification', 'Product_specificationId', {
|
||||
name => 'hue',
|
||||
value => '75',
|
||||
units => 'lumens',
|
||||
});
|
||||
|
||||
$tag->commit;
|
||||
|
||||
diag "Done.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue