+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to add a field to a Field Group

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    7

    How to add a field to a Field Group

    I'm sure i'm just being dense, but I cannot see anywhere how to administrate a field group.
    When editing a group (for instance : Common), I can see 'Key', 'Name', 'Expansion' and 'Status', but nowhere which fields that particular group is using.

    The buttons above this area simply say 'Add a group' or 'Groups List'.

    Where do I need to go to modify what fields are being used inside a group?

    Thanks in advance.
    Sam.

  2. #2
    Junior Member
    Join Date
    Jul 2013
    Posts
    7
    ...after a little more probing, I think I understand better.
    The groups are not predefined, but defined once they are added to the category itself.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    7
    So as a further question to the above, does anyone know how to add a group of predefined fields at once?
    This appears to be not possible at this moment. I couldn't see it working on the demo site, or my own.

    For instance, (as I currently understand it) if I am to add a new category - I've got to manually add name, price, description etc to the 'Common' field group box for every new category I make. (certainly if the category has no parent.) I can't just drag 'Common' onto the category as it is.

    This seems a bit illogical, as it will be very time consuming and can lead to manual error.

    Does anyone have any suggestions around this problem, or am I approaching this the wrong way?
    I'd rather not manually add 10 fields to my already defined categories (which have no parent.) over and over again!

  4. #4
    Hello Sam,

    You can set General Category and for all new and existing categories, system will use fields from General
    Go to Admin Panel >> Listing Types click edit icon then find line: 'General Category' and select any category with fields and save. And then all categories without fields will use fields from General category. But if you add 1 field or more in to category without fields this category will use this fields and will ignore fields from general category. (Other categories shouldn't use any fields for show from General)
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    18
    Hi all, i have one question about listing fields in listing_details.tpl. My question is: how to wrote a function or php code in .tpl to have possibiliti to show only field name that i whant to show or without field name only field valute.
    Like this:
    field name : Telephon
    field valute: 00xxxxxxx
    in some case i whant only a telephon valute (00xxxxxx). withouth field name -> telephon.
    Not only for telephon field name - for all fields name.
    in listing_details.tpl is a foreich function for all fields names once i need for one by one field .. sorry on bad englich.

    Thanks in advance..

  6. #6
    Hello Drazen Corak,

    Exist 2 way for it.

    1-st way - hardcode it. Open file: ftp://templates>>your_template>>tpl>>blocks>>field_out.t pl

    find line:
    Code:
    Only registered members can view the code.
    and create condition for it:
    Code:
    Only registered members can view the code.
    'phone' - it's key for phone field.
    you will see name only for field with key - phone
    Key for each field you can see in Admin Panel >> Listings Fields click edit icon and then in opened page you will see Key in 1-st line.

    2-nd way - dynamic. Create new config for fields and set yes/no into add/edit listing fields in Admin Panel, Then create new column in DB >> fl_listing_fields table then needs some php code for save this configs when you create/edit listing field
    and then in tpl file create condition for it.

    If you want 2-nd point I can explain you better but it's difficult way for create it.
    Viktor,
    Flynax technical department,
    Best wishes.

  7. #7
    Junior Member
    Join Date
    Oct 2012
    Posts
    18
    Hi Viktor thanks,

    i try this way:

    {if $item.Key == 'opisite_kratko' }<td class="name"></td>

    {else}
    <td class="name">{$item.name}:</td>
    {/if}

    - this is for one field.
    How to write for multi field, for 2 field?

    i dont understand {if} function - i now that is posibility for ' and if ' but dont now where that is going.

  8. #8
    Thanx Viktor

  9. #9
    Hello Drazen,

    Q: How to write for multi field, for 2 field?

    Code:
    Only registered members can view the code.

    Other than that happy coding...
    Flynax Technical Department

  10. #10
    Junior Member
    Join Date
    Oct 2012
    Posts
    18
    Thanx Alex.
    I will try this way.

+ Reply to Thread