Modifying the Buy Now Button
I'm building a site for a guy that sells puppies. And the SKU name is the puppy's name. I figured out how to change the text of the button to say "Adopt", but I'd like it to say "Adopt Junior" Junior = SKU
Here's my code from the /customer/buttons/buy_now.tpl Code:
{* I'd also like to do the same thing in the Details view. |
Re: Modifying the Buy Now Button
{include file="customer/buttons/button.tpl" button_title="Adopt {$product.productcode|escape}" additional_button_class=$additional_button_class|c at:' add-to-cart-button'}
Try that |
Re: Modifying the Buy Now Button
Error: Smarty error: [in customer/buttons/buy_now.tpl line 5]: syntax error: invalid attribute name: '{$product.productcode|escape' (Smarty_Compiler.class.php, line 1550) in /home/minfinge/public_html/littlepuppiesonline.com/include/lib/smarty/Smarty.class.php on line 1093
Adopt " additional_button_class=$additional_button_class|c at:' add-to-cart-button'} |
Re: Modifying the Buy Now Button
Eh, I'll mess around with it on mine. That was mostly a copy+paste in :P
|
Re: Modifying the Buy Now Button
So far I can't find out how to get it to have other characters.
{include file="customer/buttons/button.tpl" button_title=$product.productcode|escape additional_button_class=$additional_button_class|c at:' add-to-cart-button'} That will display only the sku. Trying to add the text in before it breaks it. Perhaps someone else with more knowledge of smarty will be able to help >< |
Re: Modifying the Buy Now Button
try:
button_title='Adopt '|cat:$product.productcode |
Re: Modifying the Buy Now Button
Sorry about the previous post that did it perfectly!!!
Full TPL Code: Code:
{* Another question is that I want the customer to be taken to the details page instead of the button adding it to the cart. I know this is simple, but I haven't had a chance to look into it. There are options in the Details Page that are required to be completed before adding the dog to the cart. |
Re: Modifying the Buy Now Button
{include file="customer/buttons/button.tpl" button_title="Adopt `$product.productcode`" additional_button_class=$additional_button_class|c at:' add-to-cart-button'}
|
Re: Modifying the Buy Now Button
I think I found the code I need to change in the
Code:
<div class="button{if $additional_button_class} {$additional_button_class}{/if}" title="{$title|default:$button_title|escape}" onclick="{$div_link}"> I think the <a href...> needs to be changed to <a href="{$url}" class="see-details"> But that didn't work either lol |
Re: Modifying the Buy Now Button
Quote:
|
All times are GMT -8. The time now is 10:13 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.