All Collections
Customizations
Create a custom gifting modal button
Create a custom gifting modal button

If you'd like to launch the Send as Gift modal using some JavaScript for your custom theme, here are some simple instructions

Updated over a week ago

As a developer, you may want the option of launching the Givy gifting modal from a non-product page. This is great for custom Shopify pages, blog posts, or as an option from your home page.

The modal can be launched using basic JavaScript. This means you can add it as an onclick event for any button, image, form, etc...

Here it is - simply run the following command (replace the number with the product variant ID from Shopify). If you don't know how to find this ID, learn how to Find a Shopify Variant ID.

window.GIVY.displayModal('123456789')

For this JS command to work, the Givy app embed must be enabled on your theme

If you'd like to launch this from an existing <a> link on the page, or the url for an existing button, you should try this as the URL:

javascript:window.GIVY.displayModal('123456789')

This will load the gifting modal with the correct product variant selected.

If you're doing this within a page builder such as PageFly, Ecomposer Builder, or GemPages, check out these dedicated articles:

  • Gifting with PageFly Page Builder (coming soon)

  • Gifting with Ecomposer Page Builder (coming soon)

  • Gifting with GemPages Page Builder (coming soon)

Having issues with this? Please reach out via chat and our team will be happy to assist.

Did this answer your question?