Email Basket

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
User avatar
Tomgard
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 108
Joined: Sun Jul 20, 2008 1:00 pm

Email Basket

Post by Tomgard » Thu Jan 22, 2009 1:44 pm

I would like to add the option of 'Email Basket' wherever you see 'Checkout Now'.
Shopper would then have the option to email a basket to any address, and a note to the email and the email would contain a link back to the basket for modifications or checkout. Settings to keep abandon baskets for 30+ days would need to be enabled but other than that I can think of any major retrieval issues.

Has anyone done this?
Bryan Bundgaard
AC7 User http://www.SchoolSupplyStore.com

Robbie@FireFold
Commodore (COMO)
Commodore (COMO)
Posts: 433
Joined: Wed May 28, 2008 9:42 am
Location: Concord, NC
Contact:

Re: Email Basket

Post by Robbie@FireFold » Thu Jan 22, 2009 7:01 pm

Would be a nice feature!
Robbie Hodge
General Manager
Robbie@FireFold.com
http://www.FireFold.com

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

Re: Email Basket

Post by mazhar » Fri Jan 23, 2009 7:59 am

I think this is doable. The API exposes the functionality to migrate the baskets for users. All we need to is to create some temporary user for each Email basket request, fill the newly created user basket with the items from the actual basket and send the Email with basket link, temporary user id and validation code at desired Email address. When user returns to basket page using the link form his/her Email then first we can check the code to verify the user then migrate the baskets and finally delete the temporary user information. You can also write your custom routine to clear the temporary users. This will be useful for those baskets which actually never been tracked back by the customer. You can use the following script to drop those temporary users and baskets information.

Code: Select all

CommerceBuilder.Users.UserCollection users = CommerceBuilder.Users.UserDataSource.LoadForUserName("temp-user-for-basket");
        if (users.Count > 0)
        { 
            foreach(CommerceBuilder.Users.User user users)
                user.Delete();
        }
The attachment contains modified files, install these files in very same order. Please take a backup of you App_Code/BasketHelper and ConLib/Basket.ascx.cs files before installing these files. After installation all you need is to place the EmailBasket control some where on store pages where you want the user to send basket Emails. Now add a new Email template with name EmailBasket. Following NVelocity parameters will be available in this Email template
$store,$user,$basket,$basketlink
where $basketlink contains the link of basket page with information required. For example you can put link to basket page in template as below

Code: Select all

<a href="${basketlink}">Click here for basket</a>
.

User avatar
Tomgard
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 108
Joined: Sun Jul 20, 2008 1:00 pm

Re: Email Basket

Post by Tomgard » Fri Jan 23, 2009 12:26 pm

Will this only work if the original user has created an account?
Bryan Bundgaard
AC7 User http://www.SchoolSupplyStore.com

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

Re: Email Basket

Post by mazhar » Fri Jan 23, 2009 12:31 pm

No, the code does not require that any of the users must be registered.

JimFriend
Ensign (ENS)
Ensign (ENS)
Posts: 10
Joined: Thu Jul 05, 2007 1:31 pm
Contact:

Re: Email Basket

Post by JimFriend » Wed May 06, 2009 12:51 pm

I know this is a bit of an old post... however I'm using this control and I'm getting some odd results. For instance, it will function correctly if I am logged out of AC when I send the email off -- the email will go through, and clicking the basketlink in the email brings up the basket with the correct contents. However, if I'm logged into AC when I send the email off it doesn't work. The basket gets cleared, and when I click the basketlink in the email it brings up an empty basket. I've tried messing around with the code a bit but haven't gotten very far. I know this is supposed to work whether you are logged in or not -- but for me it is not. Any ideas?
Jim Friend
Web Developer
Image

Post Reply