When a merchant signs up for the Swym - Back in Stock Product Alerts app, he/she may use the dashboard to place the Back in Stock Product Alerts button on their sold-out-product page. Certain time, store owners may wish to use a custom button that suits the theme better visually.
If you wish to use the existing button and incorporate the functionalities of the Back in Stock Product Alerts app onto it, it can be done in the following way:


 Step1: Locate the liquid containing the button 

  1. In the admin console, go to Online Store > theme 

  2. Choose the Current theme/ Production theme

  3. Click on Action> Edit Code (Refer Image1)




Image1


Step2: Include the following piece of code to in your product page liquid file.

{% include 'swym-product-view', product: product %}
HTML



Step3: Add the following piece of code to your custom button, before the end of the button tag.

data-swaction="addToWatchlist" data-product-id="{{product.id | json}}"
HTML


Step4: To this, now add and an extra button class as below: 

“product_{{product.id}}”
HTML



Once you finish the above four steps, the existing button on your page is incorporated with the functionalities of the Back in Stock Product Alerts app.