Widget commands are a set of developer tools that let you preview and test the JS subscription widget. These commands let you change the widget template or preview the widget before publishing it in a store. Recharge is working to expand the functionality of widget commands, and we will continually update this article with new commands. There are two ways to run widget commands.
You can pass the command options via query parameter by appending the widget commands to the store URL.
Example with base product
Example with variant
- Invoke the Recharge browser object and command module and pass in the template commands as arguments.
|Command||Description||Has console command?||Options|
|recharge||Displays the widget on a product display page (even if it is unpublished)||No|
|rcTemplate||Changes the displayed template||No|
Updated 3 months ago