How To Add Membership Button In Some Products?

The membership button can be shown only on some specific products by following the below steps –

Step 1. From Shopify Admin, go to the Online Store > Themes > Actions(Published Theme) > Edit Code(Published Theme).

membership pt 1

Step 2. Open file product-template.liquid under Sections.

membership pt 2

Step 3. Copy the below code and wrap it around the cart button element available in the file.

membership pt 3

Step 4. Now, open the product in Shopify backend in which you need the membership button and copy its handle.

membership pt 4

membership pt 5

 

Step 5. Paste this copied product handle in the product-template.liquid file as mentioned in step 3.

Step 6. Now, copy the membership plan embed code and paste in the product-template.liquid file as mentioned in step 3.

membership pt 6