06-30-07 06:26 AM
Peter,
After you crete the Product/SKU do you "set" the inventory value
before you query it on the website?
I ask because I can see where you "create" the product and set the
inventory threshold, but if you don't set an inventory value > 1, then
you will always get the "Out of Stock" message.
-tomas
(I hope I didn't overlook something: I'm getting back into CS, it's
been a while!)
On Tue, 26 Jun 2007 07:48:03 -0700, Peter Trell
<PeterTrell@discussions.microsoft.com> wrote:
>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 d
o
>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
>
/*-------------------------------
* Tomas Vera
* tomas (at) sbcglobal (dot) net
*-------------------------------
*/
[ Post a follow-up to this message ]
|