Support Forums


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

Notices

 
LinkBack Thread Tools Display Modes
Old 08-27-2009, 02:53 PM   #1
Junior Member
 
Join Date: Aug 2009
Posts: 23
Rep Power: 1
adexinc is on a distinguished road
Default Remove price field for specific categories

Hi,
Can you please advise how I would go about removing the price field entirely for certain categories? I realize the price field is not accessible via admin... would I delete this field in the database and create a new 'extra field' called price for only the categories that require it? Or would I leave it as is and change the code somewhere (?) so that the price field does not appear in certain categories? (when placing an ad and when viewing the listings i would not want the price field to appear at all for specific categories)

Thank you.
Joanna.
Running 4.1.5 deepsea template
adexinc is offline   Reply With Quote
Old 08-27-2009, 02:55 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114
Lhotch is a glorious beacon of lightLhotch is a glorious beacon of lightLhotch is a glorious beacon of light
Default

forum search is your friend....

68 Classifieds Forums - Search Results
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline   Reply With Quote
Old 08-27-2009, 03:04 PM   #3
Junior Member
 
Join Date: Aug 2009
Posts: 23
Rep Power: 1
adexinc is on a distinguished road
Default

Hi

Thanks for your reply.

I have searched the forum was unable to find any answers to my query. All the answers seem to point to updating user groups.... not categories.

Joanna.
adexinc is offline   Reply With Quote
Old 08-27-2009, 04:21 PM   #4
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,691
Rep Power: 48
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

PHP Code:
{if $sDisPrice == "Y"}
   {if 
$entry.price == '0.00'}
       &
nbsp;
   {else}
       {
$smarty.const.LANG_PRICE} {$entry.price|format_money}
   {/if}
{/if} 
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.5)
Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 08-27-2009, 04:50 PM   #5
Member
 
Join Date: Apr 2009
Location: South of Spain
Posts: 93
Rep Power: 3
magicosta is on a distinguished road
Smile

Hello there,

Thank you for that code.

Can you tell us where it is supposed to be put...what file and where in that file, thank you Mike
__________________
Default Template - V 4.1.5 - Developper
magicosta is offline   Reply With Quote
Old 08-27-2009, 05:57 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36
seymourjames has a spectacular aura about
Default

This code goes into the appropriate template files like showlistings, viewlistings, etc. Wherever price is used or displayed.

Quite a bit of work in fact. The custom categories module may perhaps be better way forward. Sure Eric will respond on that.

Testing price==0.00 it is nearly what you are asking for but it assumes 0.00 means no price to be shown. What you actually ask from what I can see is test for the categories that do not need to show price. You need to get hold of the variable for each category or categoryID (need to check what is available in the template file you are editing using debug (search on forum on how to use that) and test for it appropriately. At its simplest it is this below but each file is structured a little differently on how it is displaying price.


{if $sDisPrice == "Y" }
{if $category == "blabla" || $category == "another" || etc}
{$smarty.const.LANG_PRICE} {$entry.price|format_money}
{/if}
 
{/if}
{/if}
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 08-28-2009, 12:26 PM   #7
Junior Member
 
Join Date: Aug 2009
Posts: 23
Rep Power: 1
adexinc is on a distinguished road
Default working on it...

Thanks Seymour

I'm working on it now and hopefully will have it running soon. I noticed so far I have had to make some changes to the database Checkout table but so far so good. Should this end up being successful I will post what I have done.

Thanks again.
adexinc is offline   Reply With Quote
Old 08-28-2009, 03:48 PM   #8
Coder
 
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114
Lhotch is a glorious beacon of lightLhotch is a glorious beacon of lightLhotch is a glorious beacon of light
Default

Quote:
Originally Posted by adexinc View Post
Thanks Seymour

I'm working on it now and hopefully will have it running soon. I noticed so far I have had to make some changes to the database Checkout table but so far so good. Should this end up being successful I will post what I have done.

Thanks again.
Im not sure why you would have to make changes to the database tables to accomplish what you want but irregardless, changing any of the default database table layout is a very bad idea. I say this because you could possibly render 3rd party mods inoperable or unusable. You could also make upgrading 68C impossible.
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline   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
removing price field on certain categories DGiscombe v4 Questions & Support 4 Yesterday 09:48 AM
how to remove "price" field.... glowgirl v4 Questions & Support 2 11-28-2008 06:10 PM
Remove List Price field VikingBEAR v4 Questions & Support 1 05-07-2008 03:26 AM
removing the price field on some categories manilaboy v3.1 Questions & Support 2 11-26-2006 06:09 PM
Remove price field from featured listing.. deebee v3.1 Questions & Support 6 09-14-2006 05:00 PM


All times are GMT -4. The time now is 02:49 PM.


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