Support Forums

Remove price field for specific categories

This is a discussion on Remove price field for specific categories within the Technical Support forums, part of the Technical Support Forums category; Hi, Can you please advise how I would go about removing the price field entirely for certain categories? I realize ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 08-27-2009, 02:53 PM   #1
Junior Member
 
Join Date: Aug 2009
Posts: 24
Rep Power: 5
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  
Old 08-27-2009, 02:55 PM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,274
Rep Power: 129
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

forum search is your friend....

68 Classifieds Forums - Search Results
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 08-27-2009, 03:04 PM   #3
Junior Member
 
Join Date: Aug 2009
Posts: 24
Rep Power: 5
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  
Old 08-27-2009, 04:21 PM   #4
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,973
Rep Power: 58
Mike-N-Tosh is just really nice Mike-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 & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and 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  
Old 08-27-2009, 04:50 PM   #5
Customer
 
Join Date: Apr 2009
Location: South of Spain
Posts: 190
Rep Power: 9
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.10 - Developper
magicosta is offline  
Old 08-27-2009, 05:57 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,776
Rep Power: 67
seymourjames is a jewel in the rough
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}
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline  
Old 08-28-2009, 12:26 PM   #7
Junior Member
 
Join Date: Aug 2009
Posts: 24
Rep Power: 5
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  
Old 08-28-2009, 03:48 PM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,274
Rep Power: 129
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by adexinc
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

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing price field on certain categories DGiscombe Customizations 4 09-24-2009 09:48 AM
how to remove "price" field.... glowgirl Technical Support 2 11-28-2008 06:10 PM
Remove List Price field VikingBEAR Technical Support 1 05-07-2008 03:26 AM


All times are GMT -4. The time now is 12:29 PM.


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