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

Not listing prices on some items only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-21-2006, 07:46 AM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default Not listing prices on some items only

I run a nonprofit site. We sell some stuff but we also get donations through our shopping cart.

For the donations, it's a bit clumsy showing a dollar value of $1 with people then having to change the quantity in the cart.

Ideally, for items in the donation category (we have different projects that people can donate to) there would be no price shown. Presumably this would involve some kind of "if" statement, but that's way beyond my level of expertise.

I'd welcome any suggestions for how to make this change.
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #2  
Old 02-21-2006, 09:04 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

just leave the price empty and it turns into an enter price box
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 02-21-2006, 05:41 PM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

Thanks, Shan. Leaving the price at zero brings up a text box, but when I click "add to cart" I'm taken to the shopping cart where the following is displayed:

$ 0.00 x [ ]= $ 0.00

I can't get x-cart to leave the price empty. By default it inserts 0.00 as the price.

Any other thoughts?
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #4  
Old 02-21-2006, 05:44 PM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

I should have mentioned that I've tried going to the general settings and changing the minimum amount from empty to blank, but that's made no difference.
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #5  
Old 02-22-2006, 04:08 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

if you look in product.tpl youll see a bit of code that makes that text box appear, you can set the default value of it to a certain number or you can make it into a drop menu with say 5,10,15,20 as the options etc
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 02-22-2006, 05:36 AM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

I've looked in product.tpl but I'm not sure which piece of code you're referring to and I'm afraid I wouldn't know how to make the change you suggested. Would you mind spelling that all out for me?

I'd prefer the option of having a default value rather than a drop-down list with set amounts.

Many thanks.
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #7  
Old 02-22-2006, 05:57 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

find this (approx line 43)

Code:
{else} <INPUT name="price" type="text" size="7"> {/if}

change for this

Code:
{else} Make a Donation : <INPUT name="price" type="text" value="10" size="7"> {/if}

change 10 for whatever you want to be there by default
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #8  
Old 02-22-2006, 08:22 AM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

Thanks for your help, Shan. How's the weather in Brum?

We're getting there. There's just one remaining problem, which is that the donor has to click on "add to cart" first in the category page and then again in the product detail page. That's a bit offputting.

Any thoughts about how we could streamline this?

Thanks.
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #9  
Old 02-22-2006, 04:57 PM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

I thought I'd found the solution in another post of yours, Shan (http://forum.x-cart.com/viewtopic.php?t=12019). This also dealt with the add to cart button taking people to the product details page rather than to the cart when a product has a zero price, but when I tried that modification I was back to having $0 x n = $0 in the cart again.
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
Reply With Quote
  #10  
Old 02-24-2006, 04:48 AM
 
Bodhipaksa Bodhipaksa is offline
 

Advanced Member
  
Join Date: May 2004
Posts: 41
 

Default

Just a bump really, and an appeal for help. As a reminder, Shan has helped me to have "products" in our nonprofit site's "donations" category (the various "products" are different project that people can give money to) have a text box rather than a drop-down list. That's great. People can now enter their own amount rather than being presented with a $1 donation and having to change the quantity in the cart.

The remaining probolem though is that people wanting to donate click on "add to cart" in the donations category page, but instead of being taken to the cart they are taken to the product details page, where they have to click on "add to cart" once more. Obviously this isn't very customer-friendly, and I'd appreciate any help either in:

1) getting the "add to cart" in the donations category page to say ""Read more details" or

2) taking people straight to the cart when they click on the first "add to cart" link.

Thanks,
Bodhipaksa
__________________
X-Cart version: 4.3.1
Web server: Apache
Operation system: Linux
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 02:03 AM.

   

 
X-Cart forums © 2001-2020