Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Can you guide me how to add a product into the basket. I am using sitecore & uCommerce.
Thanks
Hi Shibu,
It's quite simple. Whether you're using Umbraco or SiteCore it's the same API (as far I'm aware). Try to take a look at this http://docs.ucommerce.net/ucommerce/v6/getting-started/transaction-foundation/basket.html at uCommerce documentation. It should help you get started.
You are supposed to look at the TransactionLibrary.
Best regards Martin
Hi Martin
I have followed the instruction as mentioned in the document but it is giving me the message that product sku "blahblah" doesnot exists.
Below is code what I have written
Get a product
var productItem = UCommerce.EntitiesV2.Product.SingleOrDefault(x => x.ProductId == 105);
Adding to Basket
TransactionLibrary.AddToBasket("200", productItem.Sku);
TransactionLibrary.ExecuteBasketPipeline();
But I am getting an exception that
System.ArgumentException: The product with SKU '5159803' does not exist
But db it is present and and I am not able to find the solution of it.
Please reply what I am doing wrong over here.
Is the product a product family (having variant products?)
Hi
No product is not a variant products. But let me tell you now the same code is working. I am surprised to see why this is behaving like this
Shibu
Hi again,
Not to be rude but did you solve it? :) I'm not following your last comment entirely.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to create a new basket
Hi,
Can you guide me how to add a product into the basket. I am using sitecore & uCommerce.
Thanks
Hi Shibu,
It's quite simple. Whether you're using Umbraco or SiteCore it's the same API (as far I'm aware). Try to take a look at this http://docs.ucommerce.net/ucommerce/v6/getting-started/transaction-foundation/basket.html at uCommerce documentation. It should help you get started.
You are supposed to look at the TransactionLibrary.
Best regards Martin
Hi Martin
I have followed the instruction as mentioned in the document but it is giving me the message that product sku "blahblah" doesnot exists.
Below is code what I have written
Get a product
var productItem = UCommerce.EntitiesV2.Product.SingleOrDefault(x => x.ProductId == 105);
Adding to Basket
TransactionLibrary.AddToBasket("200", productItem.Sku);
TransactionLibrary.ExecuteBasketPipeline();
But I am getting an exception that
System.ArgumentException: The product with SKU '5159803' does not exist
But db it is present and and I am not able to find the solution of it.
Please reply what I am doing wrong over here.
Hi Shibu,
Is the product a product family (having variant products?)
Hi
No product is not a variant products. But let me tell you now the same code is working. I am surprised to see why this is behaving like this
Thanks
Shibu
Hi again,
Not to be rude but did you solve it? :) I'm not following your last comment entirely.
Best regards Martin
is working on a reply...