CommerceServer Product Creation.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server Catalog > CommerceServer Product Creation.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    CommerceServer Product Creation.  
Vishal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:48 AM

Hello All,
Is their any method or property which returns True/False... if the Product
exists in the catalog.
I get an Product ID from an external system and I have to search it in the
Database before creating or updating it.
Kindly let me know.. ASAP

Vishal






[ Post a follow-up to this message ]



    RE: CommerceServer Product Creation.  
Vinayak Tadas[MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:18 PM

You can do a search using the CatalogManager.Search method
(
http://msdn.microsoft.com/library/d...-us/csvr2002/ht
m/cs_rp_catalogmanager_net_jjar.asp).
Set the strSQLClause to "ProductId=N'YourProductId'"

If the returned recordset does not contain any records then the product
does not exist
Alternatively you  can do something like

Dim oCatalogManager
Set oCatalogManager =CreateObject("Commerce.CatalogManager")
oCatalogManager.Initialize siteName, false
Set oProductCatalog = oCatalogManager.GetCatalog("catalogname")
Set oProduct = oProductCatalog.GetProduct("ProductId")
Dim oProductProperties
if oProduct  IS Nothing
listPrice = 3.0
Set oProductProperties =
oProductCatalog.CreateProduct("Definitionname", "produductid", listPrice)
Else
Set oProductProperties = oProduct.GetProductProperties()
End if
' Update properties in the oProductProperties recordset and if you want to
save the properties call
oProduct.SetProductProperties()





--------------------
Thread-Topic: CommerceServer Product Creation.
thread-index: AcSfKMyPdjbYwCpFQwC8S1J7PXSPDA==
X-WBNR-Posting-Host: 194.128.184.5
From: examnotes <Vishal@discussions.microsoft.com>
Subject: CommerceServer Product Creation.
Date: Mon, 20 Sep 2004 08:45:05 -0700
Lines: 9
Message-ID: <7BEDC347-EBEC-4A71-8F33-BE78121F3713@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.catalog
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.catalog:4956
X-Tomcat-NG: microsoft.public.commerceserver.catalog

Hello All,
Is their any method or property which returns True/False... if the Product
exists in the catalog.
I get an Product ID from an external system and I have to search it in the
Database before creating or updating it.
Kindly let me know.. ASAP

Vishal



Thanks
Vinayak Tadas
Microsoft
http://blogs.msdn.com/vinayakt

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Get Secure!  For more info visit http://www.microsoft.com/security.  Please
reply to the newsgroups only.  Thanks






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:48 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register