Magento 2 Custom variables HTML Editor

Extension for Magento by Anowave

  • In Stock
  • Price:
  • €49 90
  • SKU:
  • MAGE2-VARIABLE
  • Free installation
  • Customer choice
  • MADE IN



Adds WYSIWYG editor to Variable HTML Value in Custom Variables allowing for more user-friendly and robust content management.

Overview

Custom Variables are a handy little feature Magento 2. Magento allows you to create custom variables and then use them in e-mail templates, the WYSIWYG editor, or even code expressions. These are particularly useful when creating re-usable content across the store. The custom variables themselves are managed in System -> Other settings -> Custom variables and while stuff seems easy at first, there is a cumbersome process of managing HTML content through plain textarea. We have addressed this issue with this little extension for Magento 2.x. It adds WYSIWYG editor to Variable HTML Value in Custom Variables allowing for more user-friendly and robust content management.

 

Key features

  • Adds rich editor to Custom Variables in Magento 2
  • Adds a dependency allowing for inserting custom variables in .phtml files quickly
  • Improves HTML editing in custom variables
  • Allows for inserting variables and widgets inside other variables
  • Does not rewrite existing blocks, models and controllers
  • No monthly fees

 

Preview

Once installed, the extension will automatically convert the Variable HTML Value textarea into user-friendly rich editor allowing for quick and visually appealing content management.

 

Creating custom variables in Magento 2.x

To create re-usable custom variables in Magento, checkout the steps below.

  1. 1. On the Admin sidebar, tap System. Then under Other Settings, choose Custom Variables.
  2. 2. Tap Add New Variable.
  3. 3. Enter an identifier in the Variable Code field. Use all lowercase characters, without spaces.
  4. 4. Enter a Variable Name, which is used for internal reference. Then, do one of the following:

In the Variable HTML Value text field, enter any content you want to include, using basic HTML tags. This option allows you to format the value. In the Variable Plain Value field, enter the variable value as plain text

 

Using custom variables in static blocks, pages and emails

Once variable is created, you can use the following simple structure to insert it in any static block or page e.g. {{customVar code=variable}} where "variable" is the Custom variable code set under Variable code field

 

Using custom variables in .PHTML templates

When installed, the module exposes 2 methods available in every .pthtml file e.g.

  1. 1. <?php echo $block->getVariableValue('variable') ?> - Renders the variable plain text value
  2. 2. <?php echo $block->getVariableHtmlValue('variable') ?> - Renders the variable HTML value
Extension version
0.1.0
Magento platform version
2.0.*,2.1.*,2.* EE
Application/Purpose
Administration,Manager enhancements
Type
Commercial

Our products come with a premium support. To report a bug, use our Premium Help Desk available in your account at Anowave.

Customer review(s)

No product reviews yet. Be the first to write a review.

Note: By submitting a review you agree to our Terms and Conditions.





User Guide & Documentation

Installation from Command Line (Recommended)

This extension can be installed in a few minutes, by going through the following steps:

  • Download/purchase the extension
  • Unzip the file in a temporary directory
  • Copy directory contents and paste it in your Magento installation root directory. This extension will NOT replace existing code.
  • Disable the cache under System->Cache Management
  • Enter the following at the command line:

    php -f bin/magento module:enable --clear-static-content Anowave_Variable
    php -f bin/magento setup:upgrade
     
  • Check under Stores->Configuration->Advanced->Advanced that the module is present.

 

Manual installation

  • Download/purchase the extension
  • Unzip the file in a temporary directory
  • Copy directory contents and paste it in your Magento installation root directory. This extension will NOT replace existing code.
  • Disable the cache under System->Cache Management
  • Edit app/etc/config.php file and add two new elements:

    "Anowave_Variable" => 1
     
  • Disable the cache under System->Cache Management
  • Check under Stores->Configuration->Advanced->Advanced that the module is present.

 

Upgrading database

If you need to upgrade the database, run the following command line:

php -f bin/magento setup:db-schema:upgrade

Installation

Now: Next:

If you like this product, share it with your friends



Extensions for Magento

Anowave is an extension developer for Magento 1.x and Magento 2.x platforms. We provide a wide range of premium extensions for our in-house and public clients. The extensions that we offer extend the capabilities of Magento and provide a bespoke functionality. They also fill some missing gaps in the functionality provided by the base platform and help customers in chosing Magento as prefered ecommerce platform.

The extensions that we offer are part of our full range Magento service which includes also a Premium Helpdesk where customers get to speak with actual software engineers and get their issues resolved without hussle. Premium labeled modules also include free installation, confiuration, testing etc.