Multiple products to select for basket in one action
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 General > Multiple products to select for basket in one action




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

    Multiple products to select for basket in one action  
Matt


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


 
08-17-04 10:50 PM

Hi,

We would like to have the option that the user can add into the basket also
related products. So the product is shown and the related products are.

We would like to have the user to buy in once action the main product
including selected related items.

Anyone suggestions on how to do this?  Is standard Commerce Server available
?

Thanks,

Matthys van Leeuwen





[ Post a follow-up to this message ]



    Re: Multiple products to select for basket in one action  
Israel Vega


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


 
08-19-04 07:48 AM

Here is a code fragment to search for and fetch a related product.  Once you
have it, you can add it to the basket.  You can perform this code in the
basket or on the "add to cart" action.

//Get the parent product
Product curProduct = CommerceContext.Current.CatalogSystem.GetCatalog("Your
Catalog Name").GetProduct("The product ID that has related products");

//**Check to see if the product has related products
DataSet relProductsDS = curProduct.GetRelatedProducts();
if (relProductsDS .Tables[0].Rows.Count > 0)
{
//**There are relationships set up, get the products
for (int i=0;i<relProductsDS.Tables[0].Rows.Count;i++)
{
//**Add evaluation logic here to filter the product
relationship in case you have more than one relationship
Product relProduct = curCatSystem.GetCatalog("Your Catalog
Name").GetProduct(relProductsDS.Tables[0].Rows[i]["Your Product 
ID
KEY"].ToString());
//**Now you can add the related product to the cart
//*break;
}



"Matt" <Matt@discussions.microsoft.com> wrote in message
news:5BFA3039-95B8-4981-BB5B-19AEDE56390F@microsoft.com...
> Hi,
>
> We would like to have the option that the user can add into the basket
also
> related products. So the product is shown and the related products are.
>
> We would like to have the user to buy in once action the main product
> including selected related items.
>
> Anyone suggestions on how to do this?  Is standard Commerce Server
available?
>
> Thanks,
>
> Matthys van Leeuwen







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:15 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