Updating HidePrice Pro
What it does
Updates HidePrice Pro, and on Hyvä its companion module, to the latest release with Composer. You can update from any older version in one step, including HidePrice Pro 2.x. Your settings, price requests and product attributes stay in place.
Before you start
- Your support and updates are active, so the license covers the new version. See Activate your license.
- Command-line (SSH) access to the server where Magento runs, in the Magento root folder.
- A recent backup of your store's database and files.
- Check what changed in What's new.
- HidePrice Pro 3.1.4 and later need MageMe Core 2.1.2 or later. Composer updates Core for you with the commands below.
- On Hyvä, companion module 2.1.5 and later need HidePrice Pro 3.1.5 or later. Update both together.
- On Hyvä, companion module 2.1.7 and later need MageMe Core 2.2.1 or later. Composer updates Core with the commands below.
Steps
Update with Composer
Run these commands in the Magento root folder on your server.
-
Update the packages. On a store without Hyvä:
composer update mageme/module-hideprice-pro --with-dependenciesOn a Hyvä store, update the companion module in the same command:
composer update mageme/module-hideprice-pro mageme/module-hideprice-pro-hyva --with-dependencies -
Update the database and the store's generated files. When you update from a version before 3.1.7, stop cron first: the update rewrites the customer text of your older requests once, and cron must not touch the requests meanwhile. If
setup:upgradestops halfway, keep cron stopped and run it again. It carries on where it stopped. Start cron again when the commands below are done.bin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:clean -
On a Hyvä store, rebuild your theme's styles, the way you do after updating any module for Hyvä.
Update from HidePrice Pro 2.x
Older HidePrice Pro 2.x was often installed by copying its files into the store. Version 3 is installed with Composer only.
- If the store has a folder
app/code/MageMe/HidePricePro, remove that folder first. Magento stops with an error when it finds the same module twice. - Install HidePrice Pro 3 as described in Installation.
When bin/magento setup:upgrade runs, HidePrice Pro carries your 2.x setup over:
- The settings move to their new places on the reworked configuration page. This covers the product scope and its categories, who sees prices and what to hide. It also covers the replacements for the price and for Add to Cart with their texts and buttons, the product options, wishlist and compare settings, and the developer selectors. This happens for every store view. If a setting already has a value in its new place, that value is kept.
- The product attribute with the text that replaces the price is renamed Custom Text to Display Instead of Price.
- Every attribute set gets a HidePrice group with the HidePrice Scope attribute and the custom text.
- A new product attribute, Always Show Price Request Form, is added.
The price request form and the Price Requests screen are new in version 3, so there's nothing to carry over for them. Set them up in Set up the price request form.
Turn off or remove HidePrice Pro
To stop hiding prices, in Enable Extension, select No (how). Prices and Add to Cart show again, and your settings and price requests stay for later.
To remove the modules, run these commands in the Magento root folder. On a store without Hyvä, leave out
Hyva_MageMeHidePricePro.
bin/magento module:uninstall --remove-data Hyva_MageMeHidePricePro MageMe_HidePricePro
bin/magento setup:di:compile
The first command removes the packages with Composer and deletes the three HidePrice product attributes: HidePrice Scope, Custom Text to Display Instead of Price and Always Show Price Request Form, with their values on every product. The saved price requests and the settings stay in the database. If you install HidePrice Pro again later, the attributes are created again, empty.
The command deletes the attributes from HidePrice Pro 3.1.7 on. On an older version, update HidePrice Pro first, then remove it.
If the modules were copied into app/code instead of installed with Composer, the command above stops with
"is not an installed composer package". Remove them this way instead, leaving out Hyva_MageMeHidePricePro on a
store without Hyvä:
-
Delete the three HidePrice product attributes:
bin/magento module:uninstall --non-composer Hyva_MageMeHidePricePro MageMe_HidePriceProWith this option, the command removes only the attributes. The modules stay installed until the next steps.
-
Turn the modules off:
bin/magento module:disable Hyva_MageMeHidePricePro MageMe_HidePricePro -
Delete the folders
app/code/MageMe/HidePriceProandapp/code/Hyva/MageMeHidePricePro. -
Update the store:
bin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:clean
Use this command, not composer remove. With composer remove, the HidePrice product attributes stay, and because
HidePrice Scope still refers to HidePrice Pro, the product edit page in the admin stops opening and shows an
error. To keep your setup for later, turn HidePrice Pro off instead.
What you should see
- Stores → Configuration → MageMe Extensions → HidePrice opens, and the panel at the top shows the new version.
- Your settings are as they were, and the storefront hides prices as before.
- The Price Requests grid lists your earlier requests.
Limits
- Updating from a zip file isn't supported. Use Composer.
- If your license doesn't cover the new version, the panel at the top of the settings page says so. The storefront isn't affected. See Activate your license.
Troubleshooting
-
Composer keeps the old version. Your store's Composer file allows only older versions. Ask for the current major version, for example:
composer require mageme/module-hideprice-pro:^3.1 -
An admin page or a command shows an error after the update. Run the commands in step 2 again, in that order.
-
On Hyvä, the form looks unstyled after the update. Check that the companion module was updated as well, then rebuild the theme styles. See The form looks unstyled on Hyvä.
What's next
- What's new: the changes in each release.
- Going-live checklist: check emails, cron and a guest view after the update.
- Activate your license: renew or reactivate your license.