This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} this is a barebones menu with submenu items for Shopify {% endcomment %} | |
{% comment %} see shopify docu for creating submenu items: https://help.shopify.com/manual/sell-online/online-store/menus-and-links#create-a-drop-down-menu {% endcomment %} | |
{% comment %} first assign the menu - this is the only thing you need to change {% endcomment %} | |
{% assign linklist = settings.collections_nav %} | |
{% comment %} in the above line change the collections_nav to the handle of your main naivgation {% endcomment %} | |
{% comment %} the code below will do the rest {% endcomment %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ADD CLASS .flexbox-container TO PARENT - JOB DONE */ | |
.flexbox-container { | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-ms-flex-align: center; | |
-webkit-align-items: center; | |
-webkit-box-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %}Here we send a user straight to the checkout after adding a product to the cart - bypassing the cart - useful where we don't want to set up ajax or streamline the experience{% endcomment %} | |
<form action="/cart/add" method="post" enctype="multipart/form-data" id="add-to-cart-form"> | |
{% comment %} nest this within the form{% endcomment %} | |
<input type="hidden" name="return_to" value="/checkout" /> | |
// product form fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- here there's a simple example wwith a radio with field id features_website - 2 options --> | |
<?php $var = get_field('features_website'); ?> | |
<?php if( $var == 'web' ){ ?> | |
<p>It's a website...</p> | |
<?php } else if( $var == 'ecommerce' ){ ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- here we're going to add a % discount which is a calculation of the sale and product price --> | |
<!-- quite simple - capture the value and then display it --> | |
<!-- see newer version at end --> | |
<!-- capture the % discount --> | |
{% capture discount %} | |
{{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max }}% <!-- percentage maths --> | |
{% endcapture %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- here we're going to add a blog loop to the homepage of a shopfy store --> | |
<!-- quite simple - this is raw output --> | |
<!-- here i'm setting limit to 2 posts and it's from the default "news" blog --> | |
<!-- if there's a featured image we'll use that - else we'll use the first image of the post --> | |
<!-- you'll need to add additional markup for display based on your theme. --> | |
{% for article in blogs.news.articles limit:2 %} | |
OlderNewer