Go Back   68 Classifieds Forums > v4 Help & Support > v4 Questions & Support

v4 Questions & Support Help and support for 68 Classifieds v4

 
Thread Tools Display Modes
  #1  
Old 06-10-2008, 04:14 PM
canariasdata canariasdata is offline
Member
 
Join Date: May 2008
Location: Lanzarote/spain
Posts: 55
Rep Power: 2
Send a message via Skype? to canariasdata
Default Hide price field when price=0

Hello and sorry, me again

Another little problem I couldn't solve on my own searching the forum.

How can I hide the price field when price=0?

I would need to do this in first place for showlistings.tpl as I have "Custom Categories Module" installed but -as yous know- this only effects the categorie and searchresult view of listings.

Any Idea?

Cheers & thanks,
Gregor.
__________________
4.0.3 Developer
Reply With Quote
  #2  
Old 06-11-2008, 12:10 AM
Greg H Greg H is offline
Senior Member
 
Join Date: Jul 2007
Posts: 102
Rep Power: 6
Default

This is what I did in V3 to replace any price of 0 with "P.O.A"

In showlisitings.tpl.php, find this code:

PHP Code:
{if $sDisPrice == "Y"}
          <
td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.price}</td>
I replaced it with this.

PHP Code:
{if $sDisPrice == "Y"}

          <
td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.price|replace:'$0.00':'P.O.A'}</td>
Then, any listing with a price of 0, shows P.O.A as the price.

You may be able to achieve what you want by playing with that code.
Im not sure if you could use this:

PHP Code:
{if $sDisPrice == "Y"}

          <
td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.price|replace:'$0.00':''}</td>
Which is the same as above without the P.O.A

Good Luck
__________________
Greg

Version 3.1.9 Developer
Reply With Quote
  #3  
Old 06-11-2008, 03:25 AM
canariasdata canariasdata is offline
Member
 
Join Date: May 2008
Location: Lanzarote/spain
Posts: 55
Rep Power: 2
Send a message via Skype? to canariasdata
Default

Hi Greg,
thanks for your reply.

UPS, my error, I want to remove the price from viewlisting.tpl and not only the price value but the "Price" as well.

Something like:
HTML Code:
{if $viewprice=="Y"  && $price != 0}
<tr> 
 <td><h3>{$smarty.const.LANG_PRICE}:</h3></td>
<td><h3>{$price|format_money}</h3></td>
</tr>
{else}
<tr> 
 <td> </td>
<td> </td>
</tr>
{/if}
Any Ideas?
__________________
4.0.3 Developer
Reply With Quote
  #4  
Old 06-11-2008, 02:30 PM
canariasdata canariasdata is offline
Member
 
Join Date: May 2008
Location: Lanzarote/spain
Posts: 55
Rep Power: 2
Send a message via Skype? to canariasdata
Default

Ok, with my above question I nearly gave myself the answer.

I tried a few times it and it finaly works like this:

HTML Code:
{if $viewprice=="Y" && $price <> "0"}
<tr> 
<td><h3>{$smarty.const.LANG_PRICE}:</h3></td>
<td><h3>{$price|format_money}</h3></td>
</tr>
{/if}
Maybe helpfull for someone in the future...
__________________
4.0.3 Developer
Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MOD: Price Descriptor Chaslie v3.1 Modules 7 02-27-2008 03:23 PM
Text in Price Field? dphibb v3.1 Questions & Support 5 07-09-2007 09:12 AM
removing the price field on some categories manilaboy v3.1 Questions & Support 2 11-26-2006 06:09 PM
How do I make it so people can input text in the price field...... sbuell20 v3.1 Questions & Support 1 08-05-2006 06:24 PM
Large price field entry causes listing to be hidden in admincp civ v3.0 Questions & Support 1 04-07-2006 10:04 AM


All times are GMT -4. The time now is 01:57 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.