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

Buy Now Button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-03-2012, 04:26 PM
 
Yvonnewilt Yvonnewilt is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 41
 

Default Uselling Products - Smarty error?

Can someone help me with adding the buy now button to the products view. I tried uncommenting the code in the products_t.tpl

Code:
{*** Uncomment it if you need 'Buy Now' button *** {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} *** Uncomment it if you need 'Buy Now' button ***}


And the buy now button does then show up. However, now under 'related products' I have this error:
Warning: Smarty error: math ``x/y'' in ``modules/Special_Offers/customer/new_offers_short_list.tpl'': parameter ``y'' is empty in (store path)/Smarty-2.6.19/Smarty.class.php on line 1092


And also, when I uncomment that area, the qty line is also added to the products page. How do I remove the qty line please?

Thank you in advance!!
__________________
4.1.11
New products
News Management
Magnifier
BCSE Detailed Images
Special Offers
Wishlist
OnSale

Last edited by Yvonnewilt : 02-05-2012 at 10:30 AM. Reason: updating issue and title
Reply With Quote
  #2  
Old 02-03-2012, 06:03 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Buy Now Button

{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}{include file="customer/main/buy_now.tpl" product=$products[product]}{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 02-03-2012, 06:22 PM
 
Yvonnewilt Yvonnewilt is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 41
 

Default Re: Buy Now Button

I replaced in the products_t.tpl
Code:
{*** Uncomment it if you need 'Buy Now' button *** {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} *** Uncomment it if you need 'Buy Now' button ***}

with
Code:
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}{include file="customer/main/buy_now.tpl" product=$products[product]}{/if}

and when I go into the product view, under the related products, I have this error:
Warning: Smarty error: math ``x/y'' in ``modules/Special_Offers/customer/new_offers_short_list.tpl'': parameter ``y'' is empty in (store path)/Smarty-2.6.19/Smarty.class.php on line 1092

I'm not sure what needs fixed/changed? Any help would be much appreciated!

Thank you.
__________________
4.1.11
New products
News Management
Magnifier
BCSE Detailed Images
Special Offers
Wishlist
OnSale
Reply With Quote
  #4  
Old 02-03-2012, 07:30 PM
 
Yvonnewilt Yvonnewilt is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 41
 

Default Re: Buy Now Button

If I disable the upselling products mod, the error goes away. Any ideas how to make this work with the mod?

Thanks for all of your help!
__________________
4.1.11
New products
News Management
Magnifier
BCSE Detailed Images
Special Offers
Wishlist
OnSale
Reply With Quote
  #5  
Old 02-05-2012, 10:32 AM
 
Yvonnewilt Yvonnewilt is offline
 

Advanced Member
  
Join Date: Jun 2009
Posts: 41
 

Default Re: Buy Now Button

It appears the problem does not relate to the buy now button. Instead, it looks like an issue with the upselling products mod. When this mod is enabled, this error is being displayed in the product detail screen.

Smarty error: math ``x/y'' in ``modules/Special_Offers/customer/new_offers_short_list.tpl'': parameter ``y'' is empty in store/Smarty-2.6.19/Smarty.class.php on line 1092

Can anyone help please?
__________________
4.1.11
New products
News Management
Magnifier
BCSE Detailed Images
Special Offers
Wishlist
OnSale
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 09:45 AM.

   

 
X-Cart forums © 2001-2020