How to open the widget dynamically?
If you want the widget to be opened dynamically, Nector presently offers 3 different methods. They are discussed in detail below
window.showNectorRewards() - We can call this function to show the Nector Rewards widget
window.hideNectorRewards() - Similarly we can call this function to hide the Nector Rewards widget
These functions can be called from anywhere in the website using javascript
#show-nector-rewards - By adding this to the URL, we can enable showing the widget on the screen
Example: https://the-nector-store.myshopify.com/#show-nector-rewards
#hide-nector-rewards - By adding this, we can hide the widget from the screen
shownector=true - We can add this param to enable showing the widget on the screen
Example: https://the-nector-store.myshopify.com/?shownector=true
shownector=false - By adding this, we can hide the widget from the screen
If you have further queries regarding this, you can always contact us at support@nector.io
By calling a function
window.showNectorRewards() - We can call this function to show the Nector Rewards widget
window.hideNectorRewards() - Similarly we can call this function to hide the Nector Rewards widget
These functions can be called from anywhere in the website using javascript
By adding the hash value to the URL
#show-nector-rewards - By adding this to the URL, we can enable showing the widget on the screen
Example: https://the-nector-store.myshopify.com/#show-nector-rewards
#hide-nector-rewards - By adding this, we can hide the widget from the screen
By adding a query param to the URL
shownector=true - We can add this param to enable showing the widget on the screen
Example: https://the-nector-store.myshopify.com/?shownector=true
shownector=false - By adding this, we can hide the widget from the screen
If you have further queries regarding this, you can always contact us at support@nector.io
Updated on: 21/03/2024