Rank: Member
Joined: 10/17/2009(UTC) Posts: 6
|
Has anyone tried to do this? My scenario is an HTM page with a "buy a widget" button. This page would redirect to the store, perhaps passing some information over the querystring: ProductId=xxx&Quantity=yyy and somehow that product would be selected in the user's shopping cart, and be ready for checkout. Thanks,
-Tom.
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
|
|
|
|
|
Rank: Member
Joined: 10/17/2009(UTC) Posts: 6
|
Thank you. Works great. Is there a manual or some other source for such information? I noticed this topic is not found in the User Manual. -Tom.
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
it was added during a service pack. not sure which one. I suggest checking the BV Announcements section where any service pack availability is announced as there is normally a list of changes, bug fixes & enhancements. |
|
|
|
|
Rank: Member
Joined: 1/10/2005(UTC) Posts: 714
Thanks: 14 times Was thanked: 1 time(s) in 1 post(s)
|
its a SP after SP3. It doesnt work in my store and this is just what i need right now ;)
|
|
|
|
Rank: Member
Joined: 11/25/2003(UTC) Posts: 370
|
FYI does work in SP4 .. Do not have a 3 site to check. |
|
|
|
|
Rank: Member
Joined: 6/1/2004(UTC) Posts: 720
|
Can this still be done if you have the affiliate ID appended to the end?
Thanks, Derek |
|
|
|
|
Rank: Member
Joined: 1/31/2008(UTC) Posts: 14 Location: Florida
Thanks: 1 times
|
Hey guys, don't mean to bump an old topic but does this still work for 2013? Trying to do an email "add to cart" button. Thanks in advanced! Semi-related I wanted to add one onto individual items on the search results page, I was able to do it with any category page I make. I tried to track down the vb and it looks like I have everything I need but it still doesn't work. I'll post example code if you need it. Edited by user Monday, April 14, 2014 6:29:27 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: zinkyre Hey guys, don't mean to bump an old topic but does this still work for 2013? Trying to do an email "add to cart" button. Yes! Originally Posted by: zinkyre Semi-related I wanted to add one onto individual items on the search results page, I was able to do it with any category page I make. I tried to track down the vb and it looks like I have everything I need but it still doesn't work. I'll post example code if you need it. Could you post your code? That would be very helpful. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/31/2008(UTC) Posts: 14 Location: Florida
Thanks: 1 times
|
In the vb file
Dim imgButton As ImageButton = DirectCast(e.Item.FindControl("AddToCart2aImageButton"), ImageButton)
In the aspx file
<ItemTemplate> <div class="record"> <div class="recordaddtocart"> <asp:ImageButton ID="AddToCart2aImageButton" runat="server" /><p id="addedtocart" runat="server" visible="false" class="AddedToCartMessage"></p></div></div> </ItemTemplate>
<--This works under the categories and product page but not the search page, all the sources are the same and the code identical
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Your ASPX code looks fine. Can you provide your VB code-behind? Are you getting an error or is it just not doing anything when you click the button? If you're getting an error, please also post it. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/31/2008(UTC) Posts: 14 Location: Florida
Thanks: 1 times
|
Sorry it took a bit, I have to manage the sales at the same time. I attached both the current aspx and vb files. The lines I add to the vb are Dim imgButton As ImageButton = DirectCast(e.Item.FindControl("AddToCart2aImageButton"), ImageButton) Dim detailsButton As ImageButton = DirectCast(e.Item.FindControl("DetailsImageButton"), ImageButton) The lines I add to the asp are <div class="recordaddtocart"> <asp:ImageButton ID="AddToCart2aImageButton" runat="server" /><p id="addedtocart" runat="server" visible="false" class="AddedToCartMessage"></p> </div> Now it works on any category templates I do but when I try and add it to the search page it shows the button but doesn't do anything when clicked. My theory is that javascript is missing but looking at the page source it has the template's js files. This is where I got stuck. I also will attach the category page I made that worked. File Attachment(s): search.aspx (2kb) downloaded 1 time(s). search.aspx.vb (9kb) downloaded 1 time(s). Category.aspx (4kb) downloaded 1 time(s). Category.aspx.vb (9kb) downloaded 1 time(s).You cannot view/download attachments. Try to login or register.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
OK, it looks like you're missing some code on the search page. First, you'll need lines 161-178 on the Category.aspx.vb file. Then, you'll need the DataList1_ItemCommand function (lines 183-198); this is the function that does the work when you click the button. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/31/2008(UTC) Posts: 14 Location: Florida
Thanks: 1 times
|
But doesn't lines 161-178 in Category.aspx.vb = lines 140-157 in search.aspx.vb? And lines 183-198 = lines 163-178?
I really appreciate you taking time out to look at this.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Yes, you're right. Sorry! I see the problem now. The code that you added to the DataList1_ItemDataBound method (lines 135-160) is in the wrong place. It should be above the Else statement on line 132. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
1 user thanked Aaron for this useful post.
|
|
|
Rank: Member
Joined: 1/31/2008(UTC) Posts: 14 Location: Florida
Thanks: 1 times
|
It gave me an error, looks like I'll just have to brush up on my vb. I'll post if I have more issues. Thanks again Aaron.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.