sulu/product-bundle

Sulu Product Bundle

Maintainers

Package info

github.com/sulu/SuluProductBundle

Type:symfony-bundle

pkg:composer/sulu/product-bundle

Transparency log

Statistics

Installs: 11 082

Dependents: 6

Suggesters: 0

Stars: 9

Open Issues: 2


README

Association form overrides

The bundle generates a product_associations form with one field per configured sulu_product.association_types key. A project overrides that form by shipping its own form XML using the same product_associations key in a directory registered under sulu_admin.forms.directories — the Sulu skeleton registers config/forms by default.

Rules for the declared fields:

  • The field name must be associations/<type>, where <type> is a configured sulu_product.association_types key.
  • Only the type product_selection is allowed — no other field type maps to product associations.
  • A properties collection param declares which target properties resolve, in addition to the always-forced title and url.
  • Declared fields are never regenerated or relabeled, so add <meta><title> yourself.
  • Invalid fields fail cache:warmup.
<!-- <project>/config/forms/product_associations.xml -->
<form xmlns="http://schemas.sulu.io/template/template">
    <key>product_associations</key>

    <properties>
        <property name="associations/alternative" type="product_selection">
            <params>
                <param name="properties" type="collection">
                    <param name="image" value="image"/>
                    <param name="code" value="code"/>
                </param>
            </params>
        </property>
    </properties>
</form>

Types the project does not declare keep their generated field, label and layout.