Removing the Price Field

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...


Go Back   68 Classifieds Forums > General > HTML, CSS, and Design Help

 
LinkBack Thread Tools Display Modes
  #1  
Old 04-11-2006, 07:00 AM
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 13
Default Removing the Price Field

Is it possible to remove or rename the Price Field for certain categories?
Thanks for any help
Cheers
Hugh
Reply With Quote
  #2  
Old 04-11-2006, 09:10 AM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,095
Rep Power: 55
Default

Yes.

You will need to change category.php just be for the last line to look like this:

PHP Code:
$class_tpl->assign('sec',$sec);
$class_tpl->assign('body',$body);
        
$class_tpl->display('layout.tpl.php'); 
Then in showlistings.tpl.php:

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}
To change the name in the actual ad open viewlisting.tpl.php and find the field you wish to change.

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}
Here is a post where I detailed how to hide it based on the category:

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.
Reply With Quote
  #3  
Old 04-11-2006, 09:11 AM
Moderator
 
Join Date: Mar 2006
Posts: 3,236
Rep Power: 80
Default

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
Reply With Quote
  #4  
Old 04-11-2006, 09:20 AM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,095
Rep Power: 55
Default

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
Reply With Quote
  #5  
Old 04-11-2006, 12:09 PM
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 13
Default

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
Reply With Quote
  #6  
Old 04-11-2006, 12:16 PM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,095
Rep Power: 55
Default

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}
replace with:
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
Reply With Quote
  #7  
Old 04-11-2006, 12:39 PM
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 13
Default

Hello John
Found it now and replaced it.
Still no joy I'm afraid
Any ideas
Cheers
Hugh
Reply With Quote
  #8  
Old 04-11-2006, 12:45 PM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,095
Rep Power: 55
Default

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
Reply With Quote
  #9  
Old 04-11-2006, 01:01 PM
Senior Member
 
Join Date: Apr 2006
Posts: 126
Rep Power: 13
Default

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
Reply With Quote
  #10  
Old 04-11-2006, 01:03 PM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,095
Rep Power: 55
Default

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
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
Trackbacks are On
Pingbacks are On
Refbacks are On

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


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


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22