This is a discussion on Removing the Price Field within the HTML, CSS, and Design Help forums, part of the General category; Is it possible to remove or rename the Price Field for certain categories? Thanks for any help Cheers Hugh...
|
|||||||
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Is it possible to remove or rename the Price Field for certain categories?
Thanks for any help Cheers Hugh |
|
#2
|
||||
|
||||
|
Yes.
You will need to change category.php just be for the last line to look like this: PHP Code:
find the field you wish to rename (In this case I renamed the field to Ranch for only one category (24) and gave it a specific width.) HTML Code:
{if $sDisTitle == "Y"}
<th {if $sec==24}width="100"{/if}>{if $sec==24}Ranch Name{else}{$smarty.const.LANG_TITLE}{/if}</th>
{/if}
HTML Code:
{if $viewprice=="Y"}
<tr>
<td><strong>{if $listingsection == "1"}Some other name {else}{$smarty.const.LANG_PRICE}{/if{:</strong></td>
<td>{$listingprice}</td>
</tr>
{/if}
http://www.68classifieds.com/forums/...06&postcount=4
__________________
Regards, John mods.auscity.com �By perseverance, study, and eternal desire, any man can become great.� George S. Patton Last edited by juven14; 04-11-2006 at 09:17 AM. |
|
#3
|
||||
|
||||
|
removing the price field can be done but carries with it some issues. In order to remove the price from only certain categories a check needs to be put in place in 3 difeerent templates to check the current category and if thats the category your in it wont show the price. The problem with this is if someone does a search they wont be in a category and will possibly get a mix of ads with and without prices
What a few have done is just insert a check to see if the price field contains a zeros or is empty and if so it just puts a few dashes in the price field. Its a little cleaner solution, would that work for you?
__________________
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) 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#4
|
||||
|
||||
|
Here is the code to detect a 0.00 value and replace it with ------ or whatever text you wish to be displayed:
{$entry.price|replace:'$0.00':'----------'} here '$0.00' is the value you wish to replace and '---------' is what you wish to replace it with. You have to open viewlisting.tpl.php and showlistings.tpl.php and find {$entry.price} and replace it with {$entry.price|replace:'$0.00':'----------'}
__________________
Regards, John mods.auscity.com �By perseverance, study, and eternal desire, any man can become great.� George S. Patton |
|
#5
|
|||
|
|||
|
Hello John
I found the code {$entry.price} and replaced it with {$entry.price|replace:'$0.00':'----------'} in the showlistings.tpl.php file. It was found on line 83. I searched for {$entry.price} in viewlistings.tpl.php but it was not found. When I looked at the ads on the site it has made no difference. Any idea what I am doing wrong? Cheers Hugh |
|
#6
|
||||
|
||||
|
Sorry, it has a different name in viewlistings.tpl.php:
find: HTML Code:
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
<td>{$listingprice}</td>
</tr>
{/if}
HTML Code:
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
<td>{$listingprice|replace:'$0.00':'----------'}</td>
</tr>
{/if}
__________________
Regards, John mods.auscity.com �By perseverance, study, and eternal desire, any man can become great.� George S. Patton |
|
#7
|
|||
|
|||
|
Hello John
Found it now and replaced it. Still no joy I'm afraid Any ideas Cheers Hugh |
|
#8
|
||||
|
||||
|
you have a link so I can be sure we are on the same page?
__________________
Regards, John mods.auscity.com �By perseverance, study, and eternal desire, any man can become great.� George S. Patton |
|
#9
|
|||
|
|||
|
Hello John
Here is a link to the listing page. http://www.thoroughbreddiaries.com/v...ing.php?view=8 If you like I can e-mail you the showlistings.tpl.php and viewlistings.tpl.php files for you to have a look. Thanks for your time. Cheers Hugh |
|
#10
|
||||
|
||||
|
have you switched out the $ in that bit of code with the �
__________________
Regards, John mods.auscity.com �By perseverance, study, and eternal desire, any man can become great.� George S. Patton |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MOD: Price Descriptor | Chaslie | v3.1 Modules & Modifications | 7 | 02-27-2008 03:23 PM |
| removing the price field on some categories | manilaboy | v3.1 Questions & Support | 2 | 11-26-2006 06:09 PM |
| Price field input... | foof132 | v3.1 Questions & Support | 0 | 10-17-2006 03:50 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 |