X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding a button beside wishlist (https://forum.x-cart.com/showthread.php?t=46967)

Pretty Scrappy 04-15-2009 03:23 PM

Adding a button beside wishlist
 
I want to add a button beside my wishlist button like seen here http://www.digitalcandy.us/shoppe/product.php?productid=3604&cat=0&page=1 . Any clue how to do this?

balinor 04-15-2009 03:49 PM

Re: Adding a button beside wishlist
 
You'd need to get the code for that button, and add it in the appropriate spot in customer/main/product.tpl

Pretty Scrappy 04-15-2009 03:57 PM

Re: Adding a button beside wishlist
 
have the code where would the right spot be?

balinor 04-15-2009 04:06 PM

Re: Adding a button beside wishlist
 
You'll see the add to cart and add to wishlist buttons in this area:

Code:

        <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td>
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
        </td>


Just add another table cell and add your code there, like this:

Code:

        <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td>
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
        </td>
<td>Your code here</td>


Pretty Scrappy 04-15-2009 04:14 PM

Re: Adding a button beside wishlist
 
found the spot but now I get an error and its smashed against the wishlist button
Code:

Error: Smarty error: [in customer/main/product.tpl line 174]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590) in /home/prettysc/public_html/xcart/Smarty-2.6.19/Smarty.class.php on line 1092

http://prettyscrappy.com/xcart/product.php?productid=17632&cat=0&page=1

Pretty Scrappy 04-15-2009 04:15 PM

Re: Adding a button beside wishlist
 
oh and thank you for helping me I'm new to all this

Pretty Scrappy 04-15-2009 04:17 PM

Re: Adding a button beside wishlist
 
Sorry for posting again i forgot to add my code

Code:

  <table cellspacing="0" cellpadding="0">
  <tr>
      <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
      <td>        </td>
      <td>
  {if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
  {include file="customer/add2wl.tpl"}
  {/if}
      </td>
<td>
<a href="javascript:(function(){var s=document.createElement('script');s.type='text/javascript';s.src='http://www.kaboodle.com/zg/addbutton.js?v=0.1';document.getElementsByTagName('head')[0].appendChild(s);})();"> <img src="http://www.kaboodle.com/ht/mk/img/kbutton1.gif" width="129" height="26" border="0" alt="Add To Kaboodle" /></a>
 </td>
  </tr>
  </table>



Quote:

Originally Posted by balinor
You'll see the add to cart and add to wishlist buttons in this area:

Code:

    <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td>
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
    </td>


Just add another table cell and add your code there, like this:

Code:

    <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td>
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""}
{include file="customer/add2wl.tpl"}
{/if}
    </td>
<td>Your code here</td>



balinor 04-15-2009 06:33 PM

Re: Adding a button beside wishlist
 
Try replacing this:
Code:

<td>
<a href="javascript:(function(){var s=document.createElement('script');s.type='text/javascript';s.src='http://www.kaboodle.com/zg/addbutton.js?v=0.1';document.getElementsByTagName('head')[0].appendChild(s);})();"> <img src="http://www.kaboodle.com/ht/mk/img/kbutton1.gif" width="129" height="26" border="0" alt="Add To Kaboodle" /></a>
 </td>


with this:
Code:

<td style="padding-left: 10px;">
<a href="{literal}javascript:(function(){var s=document.createElement('script');s.type='text/javascript';s.src='http://www.kaboodle.com/zg/addbutton.js?v=0.1';document.getElementsByTagName('head')[0].appendChild(s);})();{/literal}"> <img src="http://www.kaboodle.com/ht/mk/img/kbutton1.gif" width="129" height="26" border="0" alt="Add To Kaboodle" /></a>
 </td>


Pretty Scrappy 04-15-2009 07:02 PM

Re: Adding a button beside wishlist
 
That worked thank you so much!


All times are GMT -8. The time now is 10:49 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.