Magento2 Custom Options Discount
Table of Contents
- Apply Cart Rule for all custom options available
- Apply cart Rule for specific custom options
- When “only for selected custom options is set to “Yes”
- When “only for selected custom options is set to “No”
- When “only for selected custom options is set to “Yes” and Conditions are set
- Installation via app/code: Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
- Installation via Composer: Please follow the guide provided in the below link to complete the installation via composer.
- Enabled - Select “Yes” or “No” to enable or disable the module.
- License Key - Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at [email protected]
Login to your admin panel then go to Catalog > Products. Select your product and click edit from the action column. Scroll down to Customizable options. Click on add option to add a new custom option for the selected product.
Go to Marketing > Promotions > Cart Price Rules and click on Add New Rule.
Create your Cart Price Rule Normally. Then scroll down to Actions dropdown. Make sure Only for selected Custom Option? Is set to “Yes”. This option will enable the cart price rule to be applied on the custom options. Make sure there are no conditions set.
To create cart price rule for specific custom options you will need to add conditions in the Actions Column. For eg: - we have added a condition to apply discount only on the custom option that has custom options title as “Gift Wrap”. So now the discount will only be available for the Gift wrap custom option. Similarly, you can create conditions based on custom options SKU and create your custom options discount.
Conditions available for custom options are custom options title and custom options SKU.
If you have a question related to this extension please check out our FAQ Section first. If you can't find the answer you are looking for then please contact [email protected].