Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding a button beside wishlist

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-15-2009, 03:23 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default 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?
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
  #2  
Old 04-15-2009, 03:49 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-15-2009, 03:57 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default Re: Adding a button beside wishlist

have the code where would the right spot be?
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
  #4  
Old 04-15-2009, 04:06 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-15-2009, 04:14 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default 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
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
  #6  
Old 04-15-2009, 04:15 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default Re: Adding a button beside wishlist

oh and thank you for helping me I'm new to all this
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
  #7  
Old 04-15-2009, 04:17 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default 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>
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
  #8  
Old 04-15-2009, 06:33 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 04-15-2009, 07:02 PM
 
Pretty Scrappy Pretty Scrappy is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 42
 

Default Re: Adding a button beside wishlist

That worked thank you so much!
__________________
Rachael Bullion
www.prettyscrappy.com
Version 4.1.11
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:40 AM.

   

 
X-Cart forums © 2001-2020