links in javascript

Questions and answers about ShopSite Custom Templates

links in javascript

Postby queenofangels » Sat Mar 23, 2013 5:23 pm

I have a slideshow of images. I want to add the "add-to-cart" link along with the text for each image. I'm using JavaScript for the slideshow and I'm pretty much going around in circles trying to get this to work. Any examples or suggestions of how to accomplish this would be appreciated. :( :(
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm

Re: links in javascript

Postby Jim » Wed Mar 27, 2013 9:21 am

You might checkout this sample code for a javascript slideshow.
http://www.javascriptkit.com/script/script2/jsslide.shtml
It shows how to associate a link with each image. Using that method you could put the add to cart link with each product image displayed. You can get the link code by going to Merchandising > Order Anywhere, select the product and click the Show Code button. Then click on the Show URLs and copy the Add to Cart URL: section to your javascript code.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: links in javascript

Postby queenofangels » Mon Apr 29, 2013 11:39 am

Thanks Jim,
I ended up doing exactly what you suggested.
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 11 guests

cron