Modify the theme code
- Step 1: Tap on ThemesStep 2: Go to Edit codeStep 3: Click the theme.liquid fileStep 4: Paste the codeStep 5: SaveSummarize this post with AI
Modifying the theme code in Shopify is a crucial step to tailoring your online store’s functionality and appearance. It allows you to create a seamless shopping experience, satisfy your customers’ needs, and ultimately increase your profits. In this guide, you’ll learn how to efficiently modify your Shopify theme code, making the most of Shopify’s flexibility to enhance your store’s performance.
Below are some easy steps for you to follow.
To modify the theme code:
- Step 1: Tap on Themes
- Step 2: Go to Edit code
- Step 3: Click the theme.liquid file
- Step 4: Paste the code
- Step 5: Save
- Step 6: Choose the Add a new snippet button
- Step 7: Click Create snippet
- Step 8: Paste the code
- Step 9: Choose Save
Step 1: Tap on Themes
Go to the admin page by logging in your account firstly. Then, click
Online Storein the menu which is on the left-hand side of the screen. Next, tap on Themes.Step 2: Go to Edit code
Many theme you have will be displayed. Choose the one you like and click the
Actionsbutton next to the theme name. Go toEdit codein the drop-down list.Step 3: Click the theme.liquid file
Press on the
theme.liquidin theLayoutfolder.Step 4: Paste the code
In this step, make sure to find a closing tag which is
</body>. To be easier, you can pressCtrl+Fat the same time and type the word body in the searching box.Afterward, paste the following code above the closing tag you have found.
{% include 'ajaxify-cart' %}Step 5: Save
After you’ve completing edit the code, remember to click
Save.Step 6: Choose the Add a new snippet button
In this step, make sure to choose the
Add a new snippetbutton in theSnippetsfolder.Step 7: Click Create snippet
A new dialog will be shown. Name the new snippet
ajaxify-cartin the textbox. Then, clickCreate snippet.Step 8: Paste the code
Press on this link and copy the whole code. Afterward, paste it in the new file named ajaxify-cart.liquid you’ve created.
Step 9: Choose Save
Finally, choose
Saveto finish.Summary
In conclusion, modifying the theme code in Shopify can significantly enhance your store’s shopping experience by keeping customers on the product page after adding items to their cart. This simple adjustment helps create a smoother, more convenient shopping process, which can lead to increased customer satisfaction and higher sales.
Related post:
Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Vietnam. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.Related Post



