Conditional Attributes

Printer-friendly versionPrinter-friendly version

Here is one example of how this feature might work on your website. A customer buys a custom product and would like to give it as a gift and include a gift message. On the custom product page, the customer is asked: "Is this a gift". If they select "Yes", a message dialog box would open for the customer to enter their gift message. If they don't select "Yes", the message dialog box would remain closed.

The technical explanation is that this feature can be used to define dependency relationships between options and attributes for custom product classes. Dependent attributes will only be shown once the option on the parent attribute is selected.

PREPARE TO CONFIGURE CONDITIONAL ATTRIBUTES

  1. Create your custom products and add your attributes. Instructions to do so can be found here: Creating Custom Products

    • The display type for the attribute that will be the ‘Parent’ has to be 'Select box' for it to show up as a parent conditional attribute.  This corresponds to step 4 under ‘Add Attributes’ in the Creating Custom Products document.

For the example below, we’ve created a T-Shirt product with the following attributes:

  • Size (display type: radio buttons’ options: small, medium, large)
  • Is this a gift? (display type: select box; options: yes, no)
  • Gift Wrap (display type:radio buttons; options: yes, no)
  • Gift Message (display type:text field, no options)
  • To (display type:text field, no options)
  • From (display type:text field, no options)

ADD CONDITIONAL ATTRIBUTES

Navigate to: Store > Configuration > Conditional Attributes > Add Definitions

  1. Choose the product class(es) the conditional attribute should be applied to - Example: ‘T-shirt’
  2. Select the parent attribute - this is the attribute that leads to possible child attributes -  Example: 'Is this a gift?’
  3. Select the parent attribute’s option - this is the option that triggers the child attributes to appear - Example: ‘Yes’
  4. Set the ‘Type of dependency’ to ‘Enable'
  5. Select dependent attributes’ - Select all the attributes that you want to appear when ‘Yes’ is the response to ‘Is this a gift?’ - Example: Gift Wrap, Gift Message, To and From
  6. Save Definitions
  7. Select the ‘Conditional Attribute Definitions’ tab and confirm all of the parent and dependent attributes you chose are listed under the products you assigned them to.
  8. Check your custom products to make sure that the conditions work as expected.

 

IndieCommerce Help Documents

 

About ABA

American Booksellers Association is a national trade association that supports and advocates for the success of independent bookstores. We provide members with education, networking opportunities, advocacy, resources, and technology. In turn our members support local schools through book fairs, donations and author visits; promote literacy; provide inclusive community centers; connect readers and books; add character to neighborhoods; champion and center diverse and new voices; and contribute to the local economy. We feel honored to support them in their work.

Contact

PRESS INQUIRIES: [email protected]

INDIECOMMERCE: [email protected]

ALL OTHER INQUIRIES: [email protected]

 

 

Copyright 2024 American Booksellers Association. BookWeb is a registered trademark of ABA.
Privacy Policy, Cookie Policy, Accessibility Statement