Installing the extension
Use these steps to install the extension on your store.
Prepare for installation
- Back up your store's database and web directory.
- Log in to the SSH console of your server and navigate to the root directory of your Magento 2 store.
- Copy the installation instructions from the My Downloadable Products page and paste them into the SSH console. Press ENTER to proceed.
Execute the following commands to install the extension
-
Run the following command to enable the extension:
php -f bin/magento module:enable Mirasvit_Core Mirasvit_ShippingRestriction Mirasvit_ShippingArea -
Run the following command to install the extension:
php -f bin/magento setup:upgrade -
Clear the cache:
php -f bin/magento cache:clean -
Deploy static view files:
rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
php -f bin/magento setup:static-content:deploy
If you are using the Hyvä theme
Hyvä support ships with the extension, so there is no compatibility module to install: the restriction messages in the Hyvä cart shipping estimate and in the Hyvä Checkout shipping step are part of the extension itself. On a Luma store the Hyvä part stays dormant. It needs hyva-themes/magento2-theme-module 1.3.14 or later and, if you use it, Hyvä Checkout 1.3.1 or later. Rebuild the theme once after installation so its styles cover the shipping restriction templates:
-
Register the extension with the Hyvä build:
bin/magento hyva:config:generate -
Rebuild the theme assets:
cd /path/to/theme/web/tailwind/
npm run buildOn a theme older than Hyvä 1.4, run
npm run build-prodinstead. -
Deploy static view files and flush the cache:
cd /path/to/project/
rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
php -f bin/magento setup:static-content:deploy
bin/magento cache:flush
Until version 1.2.0 Hyvä support was a separate package, mirasvit/module-shipping-restriction-hyva, providing the Hyva_MirasvitShippingRestriction module. Both are gone. If the package is still installed on your store, upgrading the extension removes it by itself. See How to upgrade the extension.
If you want to upgrade the extension, please refer to the How to upgrade the extension section. To temporarily disable or remove it, use the commands from the How to disable the extension section.