VAT: 20%
Price including VAT: 35 €
Price excluding VAT: 29.17 €
Calculating incl. VAT using {{ price | times: 1.2 | money }}
- for 1 item: 35 € ==> correct
- for 2 items: 70.01 € ==> incorrect
<div class="article"> | |
<h2 class="article-title">{{ article.title }}</h2> | |
<p class="article-details">posted <span class="article-time">{{ article.published_at | date: "%Y %h" }}</span> by <span class="article-author">{{ article.author }}</span></p> | |
<div class="article-body textile"> | |
{{ article.content }} | |
{% if article.title == 'Our New merchandise' %} | |
<ul> | |
{% for product in collections.new-merchandise.products limit:3 %} | |
<li> | |
<div class="feature-product"> |
<!-- Solution brought to you by Caroline Schnapp --> | |
<!-- See this: http://wiki.shopify.com/Related_Products --> | |
{% assign image_size = 'compact' %} | |
{% assign heading = 'Other fine products' %} | |
{% if product.metafields.recommendations.productHandles %} | |
<h3>{{ heading }}</h3> | |
<ul class="related-products"></ul> |
<?php | |
$settings = array( | |
'store-domain' => 'YOUR SHOPIFY DOMAIN HERE', | |
'api-key' => 'YOUR API KEY HERE', | |
'api-secret' => 'YOUR API SECRET HERE', | |
'webhook-url' => 'YOUR WEBHOOK URL HERE, INCLUDING "KEY" PARAMETER IF APPLICABLE', | |
); | |
ini_set('display_errors', 'On'); | |
error_reporting(-1); |
<?php | |
/** | |
* Discount | |
* | |
* Create, modify, and delete Shopify discounts | |
* | |
* PHP version 5 | |
* | |
* @author Jacob McDonald <jmc734@gmail.com> | |
*/ |
Enable bean blocks to be themed (using a .tpl file) according to bean-type: | |
i.e. block__bean__BEAN-TYPE.tpl | |
Why? Combine a Bean Block with Display Suite and the innards of the block will match the DS layout | |
used, however the outer wrapping of the block must be themed separately. However if you write a | |
.tpl that matches the block it will take precedence and the DS layout will be lost. This prevents | |
using a DS layout for each type of Bean while simultaneously having full control over the Bean | |
Block’s mark-up. | |
This solution adds a theme hook suggestion so that .tpl files may be written for each type of Bean. |
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- | |
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/vbox' |
{{ 'api.jquery.js' | shopify_asset_url | script_tag }} | |
<script type="text/javascript"> | |
var variant = 231075270, // delivery item | |
count = 0, existing = 0, cart = {{ cart | json }}; | |
var returnToCart = function(line_item) { | |
window.location.href = '/cart'; | |
}; | |
VAT: 20%
Price including VAT: 35 €
Price excluding VAT: 29.17 €
Calculating incl. VAT using {{ price | times: 1.2 | money }}
<form action="/cart/add" method="post"> | |
{% if product.variants.size > 1 %} | |
{% if product.options[0] %} | |
{% assign used = '' %} | |
<label for="select-one">{{ product.options[0] }}</label> | |
<select id='select-one' onchange="letsDoThis()"> | |
{% for variant in product.variants %} | |
{% unless used contains variant.option1 %} | |
<option value="{{ variant.option1 }}">{{ variant.option1 }}</option> | |
{% capture used %}{{ used }} {{ variant.option1 }}{% endcapture %} |
I modified some code from a discussion on the Shopify wiki about using radio buttons for variants (instead of the default drop down list). This is for a Stack Overflow question about custom Shopify variants for shipping options.
Relevant Links: