How to enable Wishlist On Dev themes & Disable on Live theme?


When Wishlist Plus is installed on your store, it is installed on to the default live theme. Certain times, the default theme might not be suitable for you, and you wish to install the Wishlist on a Dev theme/ Unpublished theme. You may want to make these changes to your Dev theme/ unpublished and validate them before publishing them to the live store. You may also follow these steps below to disable Wishlist from your current theme.  Here is how to do it.  


Disable Wishlist on a Live theme/ Current theme/ Production theme

  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

  1. In the “Search files” tab on the left, Look for “theme.liquid” file and open it

  2. Search for the line of code – {% include ‘swymSnippet’ %}

  3. Comment this code out. This can be done by replace the above line with this instead – {% comment %}{% include ‘swymSnippet’ %} {% endcomment %}

Now Wishlist is disabled for your Production theme/Current theme. When you feel like you are ready to re-enable the app on the theme, just un-comment the line. 

(That is, replace it back to  {% include ‘swymSnippet’ %}



Enable Wishlist On Dev themes or Unpublished theme 


To enable/install the Wishlist on the Dev theme/Unpublished theme, You need to create two snippets files as part of the Dev theme. 


  • Open the Production theme/ Current theme on a new tab

  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)

  • Open the Dev theme/Unpublished theme on a new browser tab

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

  2. Choose one of the unpublished themes onto which you would like to enable the app (under More themes section)

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

(Image2)

  • In the Dev theme/Unpublished theme, On the “Search files” tab, Look for “theme.liquid” file and open it

  • Add code--  {% include ‘swymSnippet’ %} into the “theme.liquid” file.
    (It is recommended to add it before the </body> tag to make sure it is within the store) 

  • On you dev theme, now create a new snippet. Here is how:

    • In the Edit Code section, look for Snippets, Click on it, and select “Add a new snippet” (Refer Image3)


 

Image 3


  1. Give the snippet a name such as swymSnippet.liquid and click on create a snippet. (Refer Image4)

    Image 4


  2. Now your “swymSnippet.liquid” file is created and it will open an empty file on the editor

  • You must now copy the content of the snippet from the Current theme/Production theme onto the Dev theme

    • Go to your Current theme/Production theme tab on the browser that you previously opened 

    • On the search tab, Look for “snippets/swymSnippet.liquid” and open it. 

    • Select all the contents of the file and copy it 

    • Go back to the browser tab with the Dev theme/Unpublished theme. 

    • Paste the contents you just copied into this blank file. 

  • Copy the contents for this snippet from your PRODUCTION theme.

    • Go to the tab with the production theme

    • On the search tab, Look for “swym-product-view.liquid.” and open it. 

    • Select all the contents of the file and copy it 

    • Go back to the browser tab with the Dev theme/Unpublished theme and paste the contents.


Click Save on top right corner to make changes permanent. 


You are done! Your Wishlist from the Production theme/Current theme is now applied on to the Dev theme/Unpublished theme. You can preview the unpublished theme to make sure all setting and layouts are as desired before going live.