added product import node for the product import system
This commit is contained in:
parent
4445735a52
commit
86be08b3b2
2 changed files with 23 additions and 4 deletions
|
|
@ -912,14 +912,15 @@ sub mergeProductsWithCommerce {
|
|||
print "\tMerge old Commerce Products to new SKU based Products.\n" unless ($quiet);
|
||||
my $productSth = $session->db->read('select * from products order by title');
|
||||
my $variantSth = $session->db->prepare('select * from productVariants where productId=?');
|
||||
my $productFolder = WebGUI::Asset->getRoot($session)->addChild({
|
||||
my $productFolder = WebGUI::Asset->getImportNode($session)->addChild({
|
||||
className => 'WebGUI::Asset::Wobject::Folder',
|
||||
title => 'Converted products from Commerce',
|
||||
url => 'converted_products',
|
||||
title => 'Products',
|
||||
url => 'import/products',
|
||||
isHidden => 1,
|
||||
groupIdView => 14,
|
||||
groupIdEdit => 14,
|
||||
});
|
||||
},'PBproductimportnode001');
|
||||
$session->db->write("update asset set isSystem=1 where assetId=?",[$productFolder->getId]);
|
||||
while (my $productData = $productSth->hashRef) {
|
||||
my $sku = $productFolder->addChild({
|
||||
className => 'WebGUI::Asset::Sku::Product',
|
||||
|
|
|
|||
|
|
@ -420,6 +420,24 @@ sub getPrice {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getProductImportNode ( session )
|
||||
|
||||
Constructor. Returns the product import node object. This is where the product import system will create new products.
|
||||
|
||||
=head3 session
|
||||
|
||||
A reference to the current session.
|
||||
|
||||
=cut
|
||||
|
||||
sub getProductImportNode {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
return WebGUI::Asset->newByDynamicClass($session, 'PBproductimportnode001');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQuantityAvailable ( )
|
||||
|
||||
Returns the amount of a variant that are available.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue