[solved] ADs module - How to set 1 default category for newly created Ads
As I would like moderated category-listing of ADs I wonder if it is possible to set a DEFAULT CATEGORY for every newly created AD, lets call this category POST ADS HERE
In a second step ONLY ADMINs can change the category of this new ad from default category POST ADS HERE to any other category desired.... (can be easily done in studio/forms ... visibility)
To avoid that users change the category again, category-field visibility settings in studio/forms/edit-ads (all views) will be done.
So only the very first step is missing: How to set 1 default category for all newly created ads?
-
-
·
LeonidS
- ·
Hello Peter !
If you want to leave only one category on the ads category page (page/create-ad) then you may add the RAW block to the Studio->Pages->Ads->New Add page:
<script>
$("
#bx_ads option[value='']").attr('value', '1');$("
#bx_ads option[value!='1']").remove();</script>
This block should be the last on the page.
-
·
LeonidS
-
- · Peter
- ·
Thank You! It works well to set a default category for all newly created ads.
BUT: It seems, that categories of ads cant be changed at all after creation. With or without this JS snippet.....
Are there any more settings in studio/dev needed, to be able to change the category of an ad?
-
-
·
LeonidS
-
·
In reply to Peter
- ·
As the ads form depends from the category type (different set of fields for different types) then it would be more easy to create the new ads :-)
-
·
LeonidS
-
- · Peter
- ·
As I see there are 'only' two types of ads
- ad with price
- ad with price and year
Would categories be editable if there would be only one type of ads?
-
-
·
LeonidS
-
·
In reply to Peter
- ·
With the default settings - no, it wouldn't. It will require to change the code.
-
·
LeonidS