We want to implement a function to help create quotes for customers through the website.
What we want is to be able to create an order in the admin panel and pass the cart along to a user.
This may not be possible, Im not sure how the access restrictions are built into able.
If the basket is created and filled in admin, is it possible to access it from a regular user account, or maybe attach it to their account?
Basket Transferrance?
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Basket Transferrance?
Are you going to make price adjustments? If not, I think you can just find the user in the admin and login as that user and start the process.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- William_firefold
- Commander (CMDR)
- Posts: 186
- Joined: Fri Aug 01, 2008 8:38 am
Re: Basket Transferrance?
We will need to make price adjustments.
And those price adjustments would have to carry over.
Can it be done?
And those price adjustments would have to carry over.
Can it be done?
Re: Basket Transferrance?
You can modify the customer cart directly without actually creating an order.
This would allow you to populate their basket for them, allowing them to just log in and go straight to checkout. Would that work for you?
This would allow you to populate their basket for them, allowing them to just log in and go straight to checkout. Would that work for you?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Basket Transferrance?
Well I have tried something, I think it may help you. In order to transfer basket which is created by the admin to some one else, first of all we create a user for example we say it temp@temp.com. Now on the admin side we put the following code
When executed this code will create a basket with one item in it. Create a link for the website login page like
http://localhost/mystore/Login.aspx?buser=13
Where 13 is the user id of anonymous user created for basket from admin side
Now on the client side we modify the ConLib/LoginDialog.ascx control and locate the following lines of code
and made it look like
That's it. Now when some user visits the site through the link discussed above then when he logs on the basket created from the admin side will be shifted to him.
Code: Select all
User user = new User()
Basket basket = user.Basket;
BasketItem basketItem = BasketItemDataSource.CreateForProduct(5, 1); // Where 5 is product id being added
basket.Items.Add(basketItem);
basket.Save();
http://localhost/mystore/Login.aspx?buser=13
Where 13 is the user id of anonymous user created for basket from admin side
Now on the client side we modify the ConLib/LoginDialog.ascx control and locate the following lines of code
Code: Select all
if ((oldUserId != newUserId) && (newUserId != 0))
{
User.Migrate(Token.Instance.User, UserDataSource.Load(newUserId));
Token.Instance.UserId = newUserId;
}
Code: Select all
if ((oldUserId != newUserId) && (newUserId != 0))
{
User.Migrate(Token.Instance.User, UserDataSource.Load(newUserId));
Token.Instance.UserId = newUserId;
int buserid = AlwaysConvert.ToInt(Request.QueryString["buser"]);
if(buserid>0)
{
Basket.Transfer(buserid, newUserId);
Token.Instance.User.Basket.Recalculate();
}
}