Link zum Plugin: http://addons.xt-commerce.com/de/plugins/custom-fields.html

Changelog: https://www.xtc-shop.de/plg_dl/changelog/xt_custom_fields



Es handelt sich um eine Schritt für Schritt Anleitung.

Wir empfehlen diese vollständig durchzuführen.

Somit erhalten Sie einen grundlegenen Überblick über die Funktionsweise.


1. INSTALLIEREN

2. REITER / TABS / REGISTERKARTEN

3. DROPDOWN

4. FELDER

5. ARTIKEL IM BACKEND

6. ARTIKEL IM SHOP-FRONTEND

     fire_class_name => "A"
fire_class_type => "dropdown"
fire_class_value => "A"
fire_class_img => ""
fire_class_img_parent => ""
fire_class_img_field => null
fire_class_id => "5"
fire_class_id_parent => "4"
fire_class_name_parent => "Feuerschutzklasse"

     {if $fire_class_name_parent && $fire_class_name}
      {$fire_class_name_parent}: {$fire_class_name}
    {/if}

           Das führt zur Ausgabe Feuerschutzklasse: A
    

7. TABS UND KATEGORIEN



1. INSTALL

- plg for adding db columns to tables associated with main xt-objects: product, category, payment ... etc

- install, activate and reload backend

- new node in west navigation 'Fields' under Shop


2. TABS

- expand node and open 'Custom fields tabs'

- add a new tab, give it the title 'Fire' (all langs required), leave categories as it is for now and save


2. DROPDOWN

- under node 'Fields' open node 'Custom fields DropDowns'

- add a new, no parent, field value 'fire_class', name 'fire class', save

- add another, select previously created as parent, field value and name 'A', save

- add another, select first created as parent, field value and name 'B', save


3. FIELDS

- Right click node 'Fields', select 'new product field -> DropDown'

- set DB field name to 'fire_class'

- select the dropdown

- set default value if you wish to assign one. when creating column all values are set to default and new created objects will have it preassigned

- ignore sortoder for now (not yet implemented)

- select the tab

- set the name to 'fire class'

- save and reload main tab 'Fields'


4. PRODUCT BACKEND

- open a product

- there should be a tab 'fire' with a dropdown named 'fire class' and and options A and B

- set the value to B


5. PRODUCT FRONTEND

- open product template product.html for editing

- add {debug} at top

- open previously edited product in shop frontend

- debug info pops up

- you should find:

    {$fire_class}         "A"

    {$fire_class_id}     "2"

    {$fire_class_name}     "fire class"

    {$fire_class_type}     "dropdown"


6. TABS AND CATEGORIES

- in backend open the 'tabs' node under 'fields'

- with 'categories mode' set to 'exclude' select category of previously edited product

- save the tab

- reload product in frontend: there are no fire_class entries in debug popup

- open product in backend: there is no tab 'fire



... to be continued

- master/slave fields are passed to ms-tpls and product-options

- icons

- category fields passed to categories_listing.html and pruducts_listing

- tab dependency, ie category dependeny applied only to products and categories