|
|
#1 |
|
Junior Member
Join Date: Aug 2009
Posts: 23
Rep Power: 1 ![]() |
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 |
|
|
|
|
|
#2 |
|
Coder
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114 ![]() ![]() ![]() |
__________________
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. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2009
Posts: 23
Rep Power: 1 ![]() |
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. |
|
|
|
|
|
#4 |
|
68 Evangelist & Developer
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,691
Rep Power: 48 ![]() ![]() |
PHP Code:
__________________
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 |
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2009
Location: South of Spain
Posts: 93
Rep Power: 3 ![]() |
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 |
|
|
|
|
|
#6 |
|
All Hands On Deck
Join Date: Mar 2008
Posts: 1,432
Rep Power: 36 ![]() |
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} |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Aug 2009
Posts: 23
Rep Power: 1 ![]() |
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. |
|
|
|
|
|
#8 |
|
Coder
Join Date: Mar 2006
Posts: 4,692
Rep Power: 114 ![]() ![]() ![]() |
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. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |