This is a discussion on Show empty price field everywhere when 0.00 within the Feature Requests forums, part of the Help & Support category; I've seen it on many big classified ads sites. When the price is 0 the field is empty. I think ...
|
|||||||
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I've seen it on many big classified ads sites. When the price is 0 the field is empty. I think it will make more sense than the present "0.00". It also can be replaced with some predefined text like "Call for the price".
|
|
#2
|
||||
|
||||
|
Quote:
replace this.... {$listingprice} with {$listingprice|replace:'$0.00':'Call for Price'} or {$listingprice|replace:'$0.00':' '}
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#3
|
|||
|
|||
|
I tried but its not working. The only file that contains {$listingprice} is userlistinginfo.tpl. When I replaced the code nothing happened.
|
|
#4
|
||||
|
||||
|
Thats was just an example and based on V3. If the viewlisting template is where you want the price altered, then look in that template for where the price is displayed.
In V4 its {$price|format_money} you could do something like this.... {$price|format_money|replace:'$0.00':'Call for Price'}
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#5
|
|||
|
|||
|
Thanks Lhotch! You've got a big virtual beer from me
.
|
|
#6
|
|||
|
|||
|
I just noticed a problem. When I use {$price|format_money|replace:'$0.00':'Call for Price'} a problem came up. 0.00 is fine but when the price is 3000.00 or so it turns to 300 or something like that.
|
|
#7
|
||||
|
||||
|
Experiment a little bit, possibly remove the format_money and adjust the 1st element of the repalce as needed.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#8
|
|||
|
|||
|
Big thanks to markstanden for the code! His solution works even when the currency symbol comes after the numbers.
Code:
======================
Find this code:
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}</strong></td>
<td><strong>{$price|format_money}</strong></td>
</tr>
{/if}
Replace with:
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}</strong></td>
{if $price=="0.00"}
<td><strong>{"P.O.A"}</strong></td>
{else}
<td><strong>{$price|format_money}</strong></td>
</tr>
{/if}{/if}
In showlisting.tpl
Find this code:
<td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.price|format_money}</td>
Replace with:
<td{if $entry.class<>""} class="{$entry.class}"{/if}>{if $entry.price=="0.00"}{"P.O.A"}{else}{$entry.price|format_money}{/if}</td>
===========================
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| when price is zero don't show | wesse249 | v4 Questions & Support | 1 | 09-07-2008 02:23 PM |
| Hide price field when price=0 | canariasdata | v4 Questions & Support | 3 | 06-11-2008 03:30 PM |
| Price show up at featured home page need to be off | cranko | v4 Questions & Support | 7 | 04-08-2008 09:10 AM |
| Not show price | garysmith | v3.1 Modules & Modifications | 10 | 05-30-2006 06:44 AM |
| If Price is $0.00 Can it not show in the ad? | garysmith | v3.0 Questions & Support | 6 | 04-18-2006 05:31 PM |