| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Modifying the Buy Now Button | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#2
|
|||||||
|
|||||||
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 |
|||||||
#3
|
|||||||
|
|||||||
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'}
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#4
|
|||||||
|
|||||||
Re: Modifying the Buy Now Button
Eh, I'll mess around with it on mine. That was mostly a copy+paste in :P
|
|||||||
#5
|
|||||||
|
|||||||
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 >< |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Modifying the Buy Now Button
try:
button_title='Adopt '|cat:$product.productcode
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
#7
|
|||||||
|
|||||||
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.
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#8
|
|||||||||
|
|||||||||
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'}
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#9
|
|||||||
|
|||||||
Re: Modifying the Buy Now Button
I think I found the code I need to change in the
Code:
I think the <a href...> needs to be changed to <a href="{$url}" class="see-details"> But that didn't work either lol
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
#10
|
|||||||
|
|||||||
Re: Modifying the Buy Now Button
Quote:
__________________
X-Cart 4.3 Joomla Among other things |
|||||||
|
|||
X-Cart forums © 2001-2020
|