All You Need to Know About Magento 2 Dependent Custom Options

0
10699
Magento 2 dependencies
Reading Time: 7 minutes

Size, color, dimensions, custom text…The shopper expects to have it all when they come to the product page.

Well-visualized. Intuitive. Comprehensive.

Your product options must satisfy these requirements.

The default Magento 2 offers the functionality to add product attributes. However, the scope of possibilities is too basic. Much workload is required to set product variants, especially when dealing with big amounts of data.

This article describes how to create Magento 2 dependency custom options and how to apply product variants to items in your catalog using the Product Options extension.

magento 2 module dependencies

Source: Researchgate

What are Dependent Custom Options?

Dependencies can be often referred to as conditional logic. They describe the relationship between parent and child options.

Have we managed to get you confused?

Let’s dig deeper into the topic and clarify all the related terms first.

Custom Options

dependent custom options

Product custom options are product variants/variations placed on the product page to enhance the customer shopping experience.

How?

The customer has it all in one place:

  • Color
  • Size
  • Material
  • Weight
  • Dimensions
  • Custom text

The list of options can be unlimited as much depends on the business needs, starting from listing the available t-shirt colors and sizes to using custom options to assemble a look.

magento dependent custom options extension

Parent/Child Options

magento 2 supports dependent custom options

Parent option is the main product variant, i.e., it’s the key product in the hierarchy of product options.

Child options are product variants dependent on the parent option, i.e., they get available (and sometimes displayed) if only the customer selects the main parent product. Until then, they can be unavailable and even hidden from the shopper in some scenarios.

For example:

You are selling t-shirts that come in blue, red, and yellow. There are different sizes available for each color option. If the customer chooses red, they will see XS and M sizes available for the t-shirt. If the customer chooses a blue t-shirt, M size only will get displayed as it’s the only size left for the selected color.

Under such a scenario, the t-shirt colors would be parent options. The available sizes would be the child options.

Like in a parent-child relationship, parents influence the behavior of their children.

Dependencies

magento 2 dependent attributes

Dependencies are the relationship between parent and child product options. 

They allow for creating custom and multiple kinds of conditional logic and displaying child options based on the customer’s sequence of actions.

There are two types of dependencies:

OR dependency is such a relationship between Magento 2 dependent attributes when a specific option value gets displayed if ANY of parent options is selected.

For example:

Available memory sizes will appear no matter what color cell phone the user selects.

AND dependency is such a relationship between Magento 2 dependent attributes when a specific option value gets displayed if ALL predefined parent options are selected.

For example:

The free wrap will appear only when the shopper selects a sliver cell phone with 128 GB memory.

See the illustration to this paragraph to better visualize what Magento dependencies are.

Benefits of Dependency Injection in Magento 2

dependency injection in magento 2

Any business owner strives to create an enhanced customer shopping experience.

Dependent custom options Magento 2 allow you to show product variants that are relevant to the shopper.

In the case of multiple product variants or assembling a custom product, it allows you to avoid overloading the product page with elements and throwing the customer into the dilemma of overwhelming choice.

But wait, there is more:

Product options dependence allows for achieving specific marketing and sales goals by establishing certain strings of logic.

Here are some of the goals that you can achieve:

  • Upselling. A newer product version with a valuable freebie can be a game-changer.
  • Cross-selling. If you are selling a cell-phone, for example, why not include offering customers an option to add a case, engraving, ear pods, etc.?
  • Product promotion. Specific product variants can be on sale.
  • Sales stimulation. Specific product choices can go with a gift.
  • Increased order value. You get to sell more items, include extra services and gifts, etc.

Is there any way to create dependent custom options in Magento 2?

Yes.

Magento 2 supports dependent custom options, but you will need to opt for a third-party solution to achieve that.

Mageworx APO

The Advanced Product Options (APO) extension allows expanding the core functionality drastically.

Let’s take a closer look at some Magento 2 dependency injection examples, and determine what actions should be taken to configure the Magento dependent custom options extension and thus achieve specific use cases.

dependent custom options for magento 2

Use Case #1. Dependencies to Promote Items

Some product options sell well. Others sell worse.

There are many marketing activities that help stimulate sales of specific product options. 

Be it offering product variants at a lower price or giving away free stuff that follows up the choice of a specific option.

Magento 2 module dependencies functionality that our extension adds allows for pursuing the set marketing goal with ease.

Scenario: Promotion of a specific product option by offering free gift wrap for that particular item. It can be an unpopular color option of a parent product.

What steps should you take?

Before you begin:

  • If you do not use APO yet, open its admin demo.
  • If you already use our dependent custom options for Magento 2, log in to your admin panel.

Procedure:

1.In the left pane, on the CATALOG tab, click Products.

2.From the available products list, select an item you wish to apply the dependency to, and then click Edit on the right.

For example, it can be an Impulse Duffle bag if you are using the admin demo.

3.To access all major product options configurations, scroll down and open the Customizable Options tab. 

4.To add product options with values, do the following:

a. On the right, click the Add Option button.

b. In the Option Title field, name the option and then specify its type.

c. On the left, click the Add Value button to add one option value. You can repeat this step to add as many option values as required.

For example, it can be setting the colors for the bag: black, white, blue. The Dropdownoption type.

d. On the right, click the Add Option button.

e. In the Option Title field, name the option as Gift Wrap. You can specify its type (Checkbox) and sort order here.

f. On the left, click the Add Value button to add one option value. You can repeat this step to add as many option values as required.

For example, it can be two option values―Male Gift Wrap and Female Gift Wrap.

5. To set any value as default and make it ticked off on the frontend, use the Is Default toggle.

In our example, we’ve got two values. Let’s leave the boxes unchecked and not set the values as default.

6. To set dependent options, click the Dependency icon.

7. To choose between OR and AND dependencies, click the Dependency Type arrow. By default, the OR setting is enabled.

8. To find the required item and establish a relationship, click the Parent Options arrow.

9. In the upper-right corner, click Save & Close.

Here’s how the configurations look in the backend:

dependent custom options magento 2
magento 2 circular dependency

Follow these steps to use gift wrapping, freebies, extended warranties as some of the means to promote specific items.

Here’s how this setup looks on the frontend:

magento 2 dependency injection example

Use Case #2. Dependencies to Upsell & Cross-sell

Upselling is undoubtedly an art.

According to the 60×60 rule, 60% of customers are likely to purchase an additional item that is worth 60% of the price that they’ve just purchased in your store (cross-selling).

According to the Sumo stats, upselling boosts revenue by an average of 10-30% and is 68% more affordable than new customer acquisition.

Why not adopt these strategies in product options?

There are multiple ways to go about upselling and cross-selling. Let’s consider one out of many possible scenarios.

Scenario: You intend to upsell a newer version of an iPad. Free Plus-1-year extended warranty could be a valuable decision-changing advantage for the shopper.

The configuration logic would be similar to the procedure described in use case #1. In this example, we will have three product variants (iPad, color option, and warranty) with values.

But let’s have a more detailed look:

Before you begin:

  • If you do not use APO yet, open its admin demo.
  • If you already use our APO, log in to the admin panel.

Procedure:

1.In the left pane, on the CATALOG tab, click Products.

2.From the available products list, select an item you wish to apply the dependency to, and then click Edit on the right.

For example, it can be an iPad if you are using the admin demo.

3.To access all major product options configurations, scroll down and open the Customizable Options tab. 

4.To add product options with values, do the following:

a. On the right, click the Add Option button (1st product option).

b. In the Option Title field, name the option and then specify its type.

For example, it can be an iPad option.

c. On the left, click the Add Value button to add one option value. You can repeat this step to add as many option values as required.

For example, it can be iPad and iPad Pro options. The Radio Buttons option type.

d. On the right, click the Add Option button to add more options (2nd product option).

e. In the Option Title field, name the option as Colors. You can specify its type (Radio Buttons) and sort order here.

f. On the left, click the Add Value button to add one option value. You can repeat this step to add as many option values as required.

For example, there can be three option values―Free Case Option 1, Free Case Option 2, and Free Case Option 3.

g. On the right, click the Add Option button to add more options (3rd product option).

h. In the Option Title field, name the option as Warranty. You can specify its type (Checkbox) and sort order here.

i. On the left, click the Add Value button to add one option value. You can repeat this step to add as many option values as required.

For example, it can be the following option value―Extended Warranty.

5. To set any value as default and make it ticked off on the frontend, use the Is Default toggle.

In our example, let’s not set the values for the two first options as default. For the Extended Warranty value, we will switch the Is Default toggle

6. To set dependent options, click the Dependency icon next to a specific dependency that you intend to configure.

7. To choose between OR and AND dependencies, click the Dependency Type arrow. By default, the OR setting is enabled.

8. To find the required item and establish a relationship, click the Parent Options arrow.

In our example, we will set OR dependency for iPad Pro; OR dependency with iPad Pro parent option for Extended Warranty, and OR dependency with iPad Pro parent option for all Free Case Options.

9. In the upper-right corner, click Save & Close.

Note that if you wish to display option price as the main one, make sure to switch the Absolute Price toggle as it is disabled by default.

Here’s how the configurations look in the backend:

magento 2 dependent custom options extension free
magento 2 module dependency
magento dependencies
magento 2 dependent custom options
magento 2 module dependencies

Remember to use the Checkbox option type to allow using multiple options and the Radio Buttons type if only one option should be made available for selection.

To configure custom option images and the way you wish them to be displayed, refer to the dedicated video tutorial.

Please refer to the official user guide for more configuration guidelines.

Here’s what we’ve got on the frontend:

dependent custom options

Final Thoughts

Like the shipping and store locator module for Magento 2, an intuitive and flawless selection of product options is vital for an eCommerce business’s success.

Dependencies help turn the product option display into a strategy.

The logic behind offering relevant product options reminds a bread crumb trail, i.e., your shopper follows a specific path that you create and gets extra value for selecting a specific route.

Whether you choose a Magento 2 dependent custom options extension free or paid, third-party Magento 2 extensions are required to set up conditional logic.

At Mageworx, we do not offer Magento 2 module dependency only. Our Advanced Product Options is a time-tested solution that has been on the market since 2016. It doesn’t have any Magento 2 circular dependency and is fully independent.

Custom option templates, image and color swatches, products inventory, import/export functionality, etc.―APO combines all that you need to manage Magento 2 custom options effectively.

magento 2 dependent custom options

***

Go ahead to leave a comment below. Your opinion is much appreciated!

LEAVE A REPLY

Please enter your comment!
Please enter your name here