Commerce Server General - Sample Code to display Relateted items in product description.

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2004 > Sample Code to display Relateted items in product description.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Sample Code to display Relateted items in product description.
Ray

2004-03-30, 2:43 pm

Hi,

I don't seem to see any code that actually displays the RELATIONSHIPs created in the product profile (product-product or product to category) this on the webpage. I also read somewhere in the CS2002 online help that there is NO code to display these relat
ionship i.e. the related item/s.

Is this a fact and if so is there some sample code out there?

Thank you.

Michael O'Donovan [MSFT]

2004-03-31, 4:36 am

Hi Ray,

All you need to do is call the GetRelatedProducts method on the product.
This will return a DataSet with the related product info.

e.g.
//where prod is a CS product
DataSet relatedProducts = prod.GetRelatedProducts();

//you could then databind relatedProducts.Tables[0] to a repeater or
datagrid to display the contents of this table, give it a try

Michael

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ray" <anonymous@discussions.microsoft.com> wrote in message
news:EA21EB1D-E5A0-4818-8383-E3B0951137D5@microsoft.com...
> Hi,
>
> I don't seem to see any code that actually displays the RELATIONSHIPs

created in the product profile (product-product or product to category) this
on the webpage. I also read somewhere in the CS2002 online help that there
is NO code to display these relationship i.e. the related item/s.
>
> Is this a fact and if so is there some sample code out there?
>
> Thank you.
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com