To add the Favorites feature to the product detail screen in Shopify, do the following
1. Introduction
This article explains the specific settings and notes for adding Shopify's "Favorites Feature" and "Favorites List Screen" using StoreCRM.
Introducing a "favorite" function to an e-commerce site is an important measure to improve the customer experience, as it saves customers the trouble of having to re-search for products they are interested in and makes it easier for them to find related products and special offers that interest them, starting with their favorite products.
The management can also improve the accuracy of marketing strategies by understanding the interests and needs of each customer, and create additional sales opportunities through additional proposals and campaign invitations (cross-selling and up-selling) based on favorite products.
StoreCRM does not require the introduction of other applications for the favorite function, and everything from the favorite function to measures using the favorite information can be realized only with this application.
The favorite function is beneficial to both the customer and the management, so we encourage you to implement it.
memo
This article will use the Dawn theme, a free theme.
Paid themes and customized themes may have different file structures.
Inquiry FormPlease feel free to contact us from
For live use, you need Email + LINE Pro or higher, or a LINE-only plan of $65 per month or higher. If you see the plan requirements, select [Check plans]. Use test mode to try setup and registrations. SeePlan requirements for favorites and back-in-stock notifications for detailed settings.
2. Install the favorite button
- Open Favorites → Favorite settings → Favorite button, configure its appearance, and save.
- In the Shopify theme editor, open the product template and select Add block → Apps → Favorite button.
- Adjust the position and save the theme. On the storefront, check adding and removing a favorite and persistence after reloading.

If your theme does not support app blocks, see the code installation instructions below.
If you are using Theme 1.0
- If you are using Theme 1.0, please add the following code to the product detail page
- The product detail page can be found by clicking Shopify > [Sales Channels] > [Online Store] > [Themes] > [Edit Code] > search for "product".
- The file name depends on the Shopify theme you are using. Usually it is main-product.liquid, etc., but if you have a product.json file, it will be the filename.liquid written in the contents of that file.
- To find where to add it, for example, above the [add to cart] button, search for "buy-button" and so on.
For a favorites button, output only id (variant ID) and title (variant name) in data-variants.Outputting all fields includes prices, SKUs, images, and other information in the HTML, increasing page size for products with many variants. The sample below outputs only the required fields. Add data-no-label for an icon-only button; omit it to display text.
This lightweight version is only for favorites buttons. Email and LINE back-in-stock buttons also use available to determine whether a variant is out of stock, so do not reduce their data to id and title. If your product variable is not named product, adjust each reference to match your theme.
To add only favorite icons
<div class="storecrm-button"
data-type="wishlist-button"
data-product-id="{{ product.id }}"
data-variant-id="{{ product.selected_or_first_available_variant.id }}"
data-product-tags="{{ product.tags | json | escape }}"
data-no-label
data-variants="[{%- for v in product.variants -%}{"id":{{ v.id }},"title":{{ v.title | json | escape }}}{%- unless forloop.last -%},{%- endunless -%}{%- endfor -%}]"></div>
To add labels such as favorite icon + favorite
<div class="storecrm-button"
data-type="wishlist-button"
data-product-id="{{ product.id }}"
data-variant-id="{{ product.selected_or_first_available_variant.id }}"
data-product-tags="{{ product.tags | json | escape }}"
data-variants="[{%- for v in product.variants -%}{"id":{{ v.id }},"title":{{ v.title | json | escape }}}{%- unless forloop.last -%},{%- endunless -%}{%- endfor -%}]"></div>
Before replacing existing code that outputs all fields, duplicate your theme, then change data-variants to the lightweight version. App updates do not change code pasted manually into a theme. Afterward, check the button display, adding and removing the selected variant, and updates to the favorites list.
Check which features need App Embed
App Embed works even if it is off because the block itself reads common JavaScript.
App Embed [Common Features of StoreCRM] is necessary for a list of favoritess, pages with no product block, a traditional customer account, and all page common widgets. Check the state of the public theme on the StoreCRM settings screen, and select "Reconfirm" only if necessary.


3. introduction of a favorite function (favorite list screen)
Goal of this item

First, let's check the completed screen of the favorite function (favorite list screen) to be implemented this time.
The favorite list screen is automatically generated by the application, and can be introduced simply by setting the URL specified by the application in the menu, etc.
This time, we will introduce a menu item named "Favorite List" in the header menu.
Set the URL of the favorite list screen in the header menu
If you changed the App Proxy URL
Normally, use the following standard URL for the favorites list.
/apps/obake/favorites
Only stores that have intentionally changed the App Proxy prefix or subpath in the Shopify admin screen will use the changed URL. After the change, StoreCRMSettings → Basic Settings → App Proxy URLPlease enter the URL in , confirm it, and replace the link in your favorites list once it has been verified.

Stores that have not changed App Proxy will continue to/apps/obake/favoritesPlease use

➀Open the menu list from [shopify admin] > [Contents] > [Menu].
This time, click on "Main menu" to add a link to the menu in the header.

➁[Click on "Add Menu Item.

(iii)Enter the name and link in the fields that appear.
You can use any name you like, but in this case, enter [Favorite List Screen].
Enter the following for the URL. Click "Add" when you are finished.
/apps/obake/favorites
4)Make sure the name of the menu item you just added is added and click "Save" at the top of the screen.


5)Access the home page and confirm that the menu you have set up has actually increased and that you can actually click on the link to go to the list of favorites screen. This completes this section.
If the "Favorite" button is not displayed, please reconfirm that you have performed steps (1) through (4) correctly.
Add a favorites list to the header menu in new customer accounts
If you are using a new customer account, you can also add a link to the Favorites list screen in the header menu of your customer account.
If you have set up multiple markets, please refer to the next section."Switch the URL of the favorites list screen for each market"Please make the settings.
Goal of this item

① Open [Shopify Admin Screen] > [Settings] > [Checkout] and click [Edit] under [Settings].

② Select [Profile] from the page selection menu at the top of the editing screen.

③Click [Header] from the left side and click the menu set in the header.

④Click “Edit”.

⑤Click [Add Menu Item].

⑥Enter the name and link and save.
The name is optional, but this time enter [Favorite List].
Enter the following URL for the link.
/apps/obake/favorites
⑦ Please actually log in to your new customer account and check that [Favorites List] is displayed in the header menu and that clicking on it will take you to the Favorites List screen.

Use the appropriate favorites-list URL for each market
If you have multiple domains and languages set up with Shopify Markets,/apps/obake/favoritesIf you set it directly, the favorites list page corresponding to the displayed language will not be displayed.
By creating a redirect page using the steps below, you can transition to the favorites list screen according to the URL of the currently displayed market.
Regarding the multilingual settings for the favorites function,「Multilingual support for favorites and back-in-stock notifications」 for more information.
① Open the theme list from [Shopify Admin Screen] > [Sales Channels] > [Online Store] > [Themes] and click [Edit Code] from the menu of the theme you want to edit.
*Note: When editing a published theme, we recommend that you make a backup copy of the theme before editing.

(2)sectionsCreate a new file in the directory. The file name is arbitrary, but this timefavorites-list-redirect.liquidfor this example.

③ Enter the following code into the created file and save it.
{% assign root_url = routes.root_url %}
{% assign last_char = root_url | slice: -1 %}
{% unless last_char == '/' %}
{% assign root_url = root_url | append: '/' %}
{% endunless %}
{% assign redirect_url = root_url | append: 'apps/obake/favorites' %}
<script>
window.location.replace({{ redirect_url | json }});
</script>4)templatesCreate a new file in the directory. The file name is arbitrary, but this timepage.favorite-list-redirect.jsonfor this example.

⑤ Enter the following code in the created file and save it.
{
"sections": {
"main": {
"type": "favorites-list-redirect",
"settings": {}
}
},
"order": [
"main"
]
}⑥ Click [Add Page] from [Shopify Admin Screen] > [Sales Channels] > [Online Store] > [Pages].

⑦Enter any title for the page title, select [favorite-list-redirect] that was added earlier from the code edit from the template, and save.

⑧ Click [Edit] for your customer account from [Shopify Admin Screen] > [Settings] > [Checkout] and select [Profile] from the page selection menu.

⑨Click [Header] from the left side, click the menu set in the header, and then click Edit.

⑩Click [Add Menu Item].

⑪Enter the name and link and save.
The name is optional, but this time enter [Favorite List].
Set the link to the page you created earlier, "Favorites List."

⑫ Access the store in each market, log in to your new customer account, and click [Favorites List] in the header menu. Please make sure that you are redirected to the favorites list screen using the domain or language path that corresponds to the displayed market.

設定ガイドで登録から一覧表示まで確認する
StoreCRMの[設定]→[お気に入り設定]で、[設置から初回動作確認まで]を開きます。①公開テーマの商品ページにお気に入りボタンを設置し、②ストアの商品ページでテスト用の商品を登録し、③管理画面とストアのお気に入り一覧に同じ商品が表示されるかを確認します。お気に入り通知のシナリオは、通知も利用する場合に追加で設定します。



結果を確認した項目で[この操作の結果を確認した]を押します。確認結果は同じストア・同じブラウザに保存されます。テーマや設定を変更した場合は、確認を取り消してからやり直せます。
![①結果を確認したあとに[この操作の結果を確認した]を押す](https://storecrm.com/help/wp-content/uploads/2026/11/s41-3405-04-full.png)
4. Customize the button and favorites list
Open Favorites → Favorite settings and switch between the Favorite button and Favorites list tabs. Check the preview and click Save.

SeeCustomize the favorite buttonfor detailed settings.
5. summary
By utilizing StoreCRM, various measures that could not be realized without adding a separate application, setting up a favorite function, or linking with other MA applications, such as the favorite function introduced this time, can be realized with this single application.
We are also preparing to create scenarios using the favorite registration information introduced this time, so please stay tuned for further information.
StoreCRM also provides free support for application setup (setup on behalf of the customer) and consulting services to help customers increase sales.
Inquiry FormPlease feel free to contact us from
Related articles