Add tooltips to configurable products and custom options.
Partially inspired by Spaggel_Tooltip (I only discovered this extension after I had mostly built this extension).
Currently supports configurable attributes (both dropdown and swatch). TODO: Add support for custom options (see XCH codebase).
User Stories & Acceptance Criteria
-
As an admin, I’d like to be able to add tooltip information to each product option so users can learn more about each option.
-
Tooltip data will show on click (not hover)
-
CMS Static Blocks will be used to power these tooltips. The Static Block IDs will be looked up using the following fallback logic:
product_option_tooltip_<product-sku>_<label>
product_option_tooltip_<label> -
The product-sku and label values will be converted using the following logic:
every character except a-z and 0-9 will be converted to a hyphen and lowercased.
For example:
Shirt Color
shirt-color
Someone’s cööl label description
someone-s-c--l-label-description
-
composer config repositories.kraken/module-product-options-tooltips git https://github.com/krakencommerce/magento2-module-product-options-tooltips.git
composer require kraken/module-product-options-tooltips:dev-master
bin/magento module:enable --clear-static-content Kraken_ProductOptionsTooltips
bin/magento setup:upgrade
bin/magento cache:flush
Option 2 - Install extension by copying files into project (only if the project requires it for some reason)
mkdir -p app/code/Kraken/ProductOptionsTooltips
git archive --format=tar --remote=git@github.com:krakencommerce/magento2-module-product-options-tooltips.git master | tar xf - -C app/code/Kraken/ProductOptionsTooltips/
bin/magento module:enable --clear-static-content Kraken_ProductOptionsTooltips
bin/magento setup:upgrade
bin/magento cache:flush
These instructions work regardless of how you installed the extension:
bin/magento module:disable --clear-static-content Kraken_ProductOptionsTooltips
rm -rf app/code/Kraken/ProductOptionsTooltips
composer remove kraken/module-product-options-tooltips
mr2 db:query 'DELETE FROM `setup_module` WHERE `module` = "Kraken_ProductOptionsTooltips"'
bin/magento cache:flush