| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to add "View details" button instead of "Add to wishlist" in products.tpl? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Hi I want to add a "View details" button to "customer/main/products.tpl"
Yeah, I know that there are already 3 + links to details page from every product in products.tpl, but I want to make it even more obvious. In my store, as of right now, I have "Buy now" enabled along with "Wishlist". Those are the only 2 buttons I have in there at the moment, sitting right under the "Select quantity" box. What I would love to have is a button " View Details" instead of "Add to wishlist" button in my products list, when clicked it should bring my customer to that product details page. I noticed that in products.tpl Wishlist button included as a part of "customer/main/buy_now.tpl, but on product details page it included as separate template. I decided to create a duplicate templates "customer/main/buy_now.tpl" and ""buttons/add_to_wishlist.tpl" (I called them "customer/main/buy_now1.tpl" and "buttons/add_to_wishlist1.tpl") to test thing out before making changes. I don't mind having wishlist button in products details page, but I don't need wishlist button in products.tpl and want to have View details" button instead. I figured easiest way to achieve it, is to create 2 separate templates "buttons/add_to_wishlist.tpl"(original) and buttons/add_to_wishlist1.tpl"(duplicate); original one for product.tpl and duplicate one for products.tpl. Here is how I modified them : customer/main/buy_now1.tpl : Code:
buttons/add_to_wishlist1.tpl : Code:
Last thing I did, I replaced buy_now.tpl with my test buy_now1.tpl in "customer/main/products.tpl", and crossed my fingers hoping it will do it. It didnt quiet work, its now showing me a desired button "View details" but also it placeed " "} " after button itself in my products list. also when I push the new button it prings me to access denied page without login option. I am giving up.. can anyone tell me what is the right way to achieve my goal? I am sure there is a much simpler, correct way to do it. Please help!!!
__________________
Version 4.7.6 X-cart Gold |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() this was very simple in 4.1.11 havn't tried it with 4.2, I'll see what I can do.
There is always the very simple way of just using the images that are used for the buttons and making a simple button with out using the button.tpl.
__________________
xcart 5.1.2 |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Mighty X-Wizard Ashley, you are my only hope, since noone else answered me, you the best!
Please enlight me with your wisdom, I would appretiate it so much!!! In my customer/main/buy_now.tpl I found if statements related to wishlist button: Code:
I know i am getting very close, btw I have 4.1.11 ![]()
__________________
Version 4.7.6 X-cart Gold |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() oh it 4.1.11.... your very first idea should have worked.
__________________
xcart 5.1.2 |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() {if $js_enabled}
{if $special_offers_add_to_cart eq 'Y'} <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product. add_date`.submit();"}</td> {else} <td>{include file="buttons/buy_now.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product. add_date`.submit(); return false;"}</td> {/if} <td> </td> <td> <table cellpadding="0" cellspacing="0"> <tr> <td><img src="{$ImagesDir}/but1.gif" alt="" /></td> <td class="Button"><a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_p age}{if $featured eq 'Y'}&featured{/if}" class="white">More Info</a></td> <td><img src="{$ImagesDir}/but2.gif" alt="" /></td> </tr> </table> </td>
__________________
xcart 5.1.2 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|