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

Free items - remove buy button?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-12-2013, 06:12 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Free items - remove buy button?

Hi,

I would like to remove the 'buy' button from the product items page for free items (digital items).

There is also a border shown where usually the price is shown where I would like to display the word 'Free'. So the price of $0.00 equals the word Free.

Thank you!
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #2  
Old 12-13-2013, 03:31 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Free items - remove buy button?

anyone knows how to remove the buy button for free items?
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #3  
Old 12-13-2013, 07:50 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Free items - remove buy button?

Let's assume you are using the ideal_comfort skin.
In /ideal_comfort/customer/buttons/buy_now.tpl

Surround the button code with an if statement like this:
Code:
{if $product.price ne 0} {include file="customer/buttons/button.tpl" button_title=$lng.lbl_buy_now_img|substitute:"AltImagesDir":$AltImagesDir tips_title=$lng.lbl_buy_now notitle=true additional_button_class=$additional_button_class|cat:' add-to-cart-button'} {/if}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
sixfigure (12-13-2013)
  #4  
Old 12-13-2013, 08:10 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Free items - remove buy button?

Quote:
Originally Posted by totaltec
Let's assume you are using the ideal_comfort skin.
In /ideal_comfort/customer/buttons/buy_now.tpl

Surround the button code with an if statement like this:
Code:
{if $product.price ne 0} {include file="customer/buttons/button.tpl" button_title=$lng.lbl_buy_now_img|substitute:"AltImagesDir":$AltImagesDir tips_title=$lng.lbl_buy_now notitle=true additional_button_class=$additional_button_class|cat:' add-to-cart-button'} {/if}

Thank you!!

Didn't work in the skin/common_folder/ folder but will try in the templates folder.

How to get rid of the border (box) where the price appears when there's no price set?
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #5  
Old 12-13-2013, 08:21 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Free items - remove buy button?

Not sure what you mean. Are you referring to the category page or product page, do you mean the input box where they enter their price?

Can you provide a link to this, show a picture or at least tell us what skin you are using?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #6  
Old 12-13-2013, 08:26 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Free items - remove buy button?

Quote:
Originally Posted by totaltec
Not sure what you mean. Are you referring to the category page or product page, do you mean the input box where they enter their price?

Can you provide a link to this, show a picture or at least tell us what skin you are using?

Sent you a PM. We use the 3-column template. Will add a picture so if others want to remove this box.
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #7  
Old 12-13-2013, 08:47 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Free items - remove buy button?

Okay, That is the price input box. Again assuming you are using ideal_comfort skin, look in: /ideal_comfort/customer/main/product_details.tpl

Around line 117 you will see this code:
Code:
{else} <input type="text" size="7" name="price" /> {/if}

Simply place comments around this input field like this:
Code:
{else} {*<input type="text" size="7" name="price" />*} {/if}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
sixfigure (12-13-2013)
  #8  
Old 12-13-2013, 09:08 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Free items - remove buy button?

Quote:
Originally Posted by totaltec
Okay, That is the price input box. Again assuming you are using ideal_comfort skin, look in: /ideal_comfort/customer/main/product_details.tpl

Around line 117 you will see this code:
Code:
{else} <input type="text" size="7" name="price" /> {/if}

Simply place comments around this input field like this:
Code:
{else} {*<input type="text" size="7" name="price" />*} {/if}

The box is gone Thanks so much!

Couldn't remove the button yet. I'm using a customized 3-column skin (common_files)
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
Reply With Quote
  #9  
Old 12-13-2013, 09:13 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Free items - remove buy button?

Good!
Try editing:
/common_files/customer/buttons/buy_now.tpl
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #10  
Old 12-13-2013, 09:14 AM
 
designguru designguru is offline
 

X-Adept
  
Join Date: Dec 2010
Posts: 418
 

Default Re: Free items - remove buy button?

I already edited this template.

There is another buy_now.tpl in the /common_files/customer/buy_now.tpl and one in here /common_files/customer/main/buy_now.tpl
__________________
X-Cart Pro 4.6.2 with many modules
X-CART Pro 4.4.1
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 03:16 AM.

   

 
X-Cart forums © 2001-2020