| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How do I... use an image for Add to Cart button? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() im using x-cart 4.0.0 and im trying to change the /buttons/add_to_cart.tpl to use a custom image for the "add to cart" link instead of button.tpl.
I can get the image to show up, but the $href variable doesnt work right and in the browser just shows up as "http://website/store/$href" instead of the actual link... am i going about this right? i tried copying all the javascript $href variable code from button.tpl and put it in add_to_cart.tpl but that doesnt work either... how do i use the $href variable? |
|||||||||
#2
|
|||||||
|
|||||||
![]() I did this by simply changing the code in skin1/buttons/add_to_cart.tpl to:
[img]{$ImagesDir}/buttons/add_to_cart.gif[/img] Make sure your image path is correct and it should work fine providing the original reference to the button template is correct: {include file="buttons/add_to_cart.tpl"} Hope it's the same in version 4! My version is 3.4.8 though my sig may say different. HTH Mat PS. This works with all buttons, but will not let you use mutiple languages, obviously.
__________________
-------- The only constant in life is change |
|||||||
#3
|
|||||||||
|
|||||||||
![]() yes that did the trick!
the code looked a little bit different at first: /customer/main/product.tpl: ******************************************** {include file="buttons/add_to_cart.tpl" style="button" href="javascript:if (FormValidation()) document.orderform.submit()"} ******************************************** changed to: ******************************************** {include file="buttons/add_to_cart.tpl" style="button"} ******************************************** Thanks very much netmagik! cheers! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|