Shortcodes

There are 2 shortcodes available to display the configurator: one inserts a button to open the configurator as a modal, the other inserts the configurator in the content.

[mkl_configurator_button]

This shortcode adds a button. Example:

[mkl_configurator_button product_id=1 classes="button primary"] or [mkl_configurator_button product_id=1 classes="button primary"]Button name[/mkl_configurator_button]

Parameters:

product_id The ID of the configurable product. Only required when using the shortcode on a page different from the product page.

classes HTML classes to add to the button.

[mkl_configurator]

This shortcode inserts the configurator in the content (inline).

[mkl_configurator product_id=1 classes="container-class something-else"]

Parameters:

product_id The ID of the configurable product. Only required when using the shortcode on a page different from the product page.

classes HTML classes which will be added to the configurator.

Troubleshooting

If the shortcode doesn’t work, it might be because it is not detected on the page. If it is not detected, the required scripts will not be loaded.

Read this article to force loading the scripts on other pages and fix this issue.

Was this page helpful?
Leave a Reply