Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Catalog > Add Products us...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 748 of 763
Post > Topic >>

Add Products using Catalog API

by =?Utf-8?B?UGV0ZXIgVHJlbGw=?= <PeterTrell@[EMAIL PROTECTED] Jun 26, 2007 at 07:41 AM

Hi,
I am adding products to a Catalog using Catalog API.
I create a Product & a Inventory SKU.  
BUT in site Inventory is not reflected, for all the products I get "Out of

Stock" message. Could this be because of "No Variant" getting created?

How do I remove the "Varient" being mandatory? because for our product we
do 
not have Varients.

The Code is
 Product oProd = baseCatalog.CreateProduct("LPProdDef", sProductID, 
dOriginal_Price, sCategory,....);
oProd["Manufacturer"] = sManufacturer; //custom property
 oProd.Save();
 // Get the product family from the catalog.              
                ProductFamily productFamily = 
(ProductFamily)baseCatalog.GetProduct(sProductID);
                // Add the variant to the product family. 
                productFamily.AddVariant(sProductID);

                //now save the inventory...
                InventorySku oSku = 
oLPInventoryCatalog.CreateSku(sCatalogName, sProductID, dQuantity, 
StockStatus.Enabled);
                oSku.Backorderable = true;
                oSku.StockOutThreshold = 1;                
                oSku.Save();


Regards
Peter
 




 1 Posts in Topic:
Add Products using Catalog API
=?Utf-8?B?UGV0ZXIgVHJlbGw  2007-06-26 07:41:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:11:49 CST 2008.