Add Cart Link to Another Application

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
ajackson
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Wed Sep 28, 2016 3:25 am

Add Cart Link to Another Application

Post by ajackson » Thu Oct 20, 2016 10:11 am

Is it possible to add the "Cart" link that displays the quantity and takes you to the basket page(shopping cart) on another application if the username/email is known?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Add Cart Link to Another Application

Post by mazhar » Sun Oct 23, 2016 11:12 pm

Well does that other application is running ablecommerce? If its some other software then you will have to check with their process of how to add an item to cart from a link. If its ablecommerce then you can find sample code in this thread viewtopic.php?f=65&t=17169
In order to add item to user with given email address instead of current user you will have to load user with given Email.

Code: Select all

BasketItem basketItem = BasketItemDataSource.CreateForProduct(productId, 1);
var user = UserDataSource.LoadForEmail(email);
user.Basket.Items.Add(basketItem);

Post Reply