How to add cart link in Ajaxian album slideshow?
hidch
Joined: 2009-03-05
Posts: 1 |
Posted: Thu, 2009-03-05 10:08 |
hello! im trying to put a cart link or icon in the album slideshow of Ajaxian theme, here is a screenshot showing where im trying to put it, as its in javascript i didnt find a way to put anything there, [img]http://img.skitch.com/20090305-q9rm9iahrwcwqfpfnae86rq2ww.preview.jpg[/img] [img]http://img.skitch.com/20090305-jjqtn9i3k5a97bpc4ym3ighpae.preview.jpg[/img] anyone can help please? thanks |
|
Posts: 17
Bump. - I'm using the carbon theme as workaround. However, the integration with the checkout module is not as good as with the cart module.
Posts: 8339
<a href="{g->url arg1="view=cart.ViewCart" arg2="itemId=`$child.id`"}">{g->text text="Add to cart."}</a>
maybe?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 17
Isn't there an authcode needed? - The Carbon theme fetches the auth code out of the possible actions for an element. Unfortunately, this actions seem not to be transmitted in the case of Ajaxian.
I would rally love to have a cart button right to the picture as it is available at Carbon.
Back to the original isse:
The code to add the icon has to be placed after line 345 at
thumbnail-functions.js
. However, I still have no clue how to construct the URL...Posts: 8339
in album.tpl you could add your link:
{assign var=childCartLink value=}<a href="{g->url arg1="view=cart.ViewCart" arg2="itemId=`$child.id`"}">{g->text text="Add to cart."}</a>
and add an additional class to the thumb (2x):
class="%CLASS% giThumbnail size:=`$child.size`= summary:=`$childSummary`= description:=`$childDescription`= cartLink:=`$childCartLink`="}
and then in thumbnail-functions.js
roughly
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1
Hi,
Useful, Thanks for sharing!
-
Jessica Danial
Posts: 17
The only issue remaining is that the cart symbol should be back-ended by AJAX.
Pressing on the basket should only add the amount if items in brackets behind. No reload of the page or whatever!