When a merchant signs up for the Swym - In Stock Alert app, he/she may use the dashboard to place the In Stock Alert 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 In Stock Alert 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 %}



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}}"


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

“product_{{product.id}}”



Once you finish the above four steps, the existing button on your page is incorporated with the functionalities of the In Stock Alert app.