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
<!-- Integration between Sufio and Bold Multi-Currency app to automatically create invoices in correct currencies. Used by Sufio for Shopify app (sufio.com/shopify). --> | |
<div class="invoice-currency-container" style="display:none;"> | |
<span class=money id="currency-rate">1.00</span> | |
<input type="hidden" id="invoice-currency" name="attributes[Invoice Currency]" value="" /> | |
<input type="hidden" id="invoice-currency-rate" name="attributes[Invoice Currency Rate]" value="" /> | |
</div> | |
<script type="text/javascript"> | |
updateInvoiceCurrency = function() { | |
$("input#invoice-currency").val(window.BOLDCURRENCY.currentCurrency); | |
$("input#invoice-currency-rate").val(window.BOLDCURRENCY.rateInfo[window.BOLDCURRENCY.currentCurrency].rate); |
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
<!-- Shopify customer account -- capture and validate VAT numbers and set business customers as tax exempt when applicable. Displays warning if VAT number is not valid. Used by Sufio for Shopify (www.sufio.com/shopify). --> | |
<div class="vat-number-display"> | |
{% if customer.metafields.sufio.vat_number %} | |
VAT Number: {{ customer.metafields.sufio.vat_number }} | |
<br /> | |
<a href="#" class="vat-edit-link">Edit</a> | |
{% else %} | |
<a href="#" class="vat-edit-link">Add VAT number</a> | |
{% endif %} | |
</div> |
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
<!-- Shopify shopping cart -- use ABN numbers from Customer Fields app. Used by Sufio for Shopify app (www.sufio.com/shopify). --> | |
<div class="vat-reg-number"> | |
<input type="hidden" id="vat_reg_no" name="attributes[VAT Registration Number]" value="{{ customer.metafields.customr.ABN }}"> | |
</div> |
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
<!-- Create invoices in EUR. Used by Sufio for Shopify (sufio.com/shopify). --> | |
<input type="hidden" name="attributes[Invoice Currency]" value="" /> | |
<input type="hidden" name="attributes[Invoice Currency Rate]" value="" /> | |
<script src="//cdn.shopify.com/s/javascripts/currencies.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var currency_code = 'EUR'; // Invoice Currency Code | |
var currency_rate = 1/Currency.rates[currency_code]; | |
$('input[name="attributes[Invoice Currency]"]').val(currency_code); | |
$('input[name="attributes[Invoice Currency Rate]"]').val(currency_rate); | |
</script> |
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
{% if customer.tags contains 'INAC' %} | |
<!-- Shopify customer account -- set INAC registered customers (Status Indian in Canada) as tax (GST) exempt. Used by Sufio for Shopify (www.sufio.com/shopify). --> | |
<script type="text/javascript"> | |
function getCookieValue(a) { var b = document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)'); return b ? b.pop() : ''; } | |
var email = "{{ customer.email }}"; | |
if (getCookieValue("sufio_vat_email_inac") != email) { | |
document.cookie = "sufio_vat_email_inac="+email+";expires=Tue, 31 Dec 2030 00:00:00 GMT;path=/"; | |
$.ajax({ | |
type : "GET", |
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
<!-- Link to print or download invoice for order on the Customer Order page. Used by Sufio for Shopify (http://www.sufio.com/shopify). --> | |
<div class="invoice"> | |
<a target="_blank" href="{{ shop.url }}/apps/sufio/invoice/?id={{ order.id }}&number={{ order.order_number }}">Invoice</a> | |
</div> |
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
<!-- Shopify customer account -- capture and validate VAT numbers and set business customers as tax exempt when applicable. Used by Sufio for Shopify (www.sufio.com/shopify). --> | |
<div class="vat-number-display"> | |
{% if customer.metafields.sufio.vat_number %} | |
VAT Number: {{ customer.metafields.sufio.vat_number }} | |
<br /> | |
<a href="#" class="vat-edit-link">Edit</a> | |
{% else %} | |
<a href="#" class="vat-edit-link">Add VAT number</a> | |
{% endif %} | |
</div> |
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
{% if customer.tags contains 'disabled' %} | |
<!-- Shopify customer account -- set disabled customer as VAT exempt. Used by Sufio for Shopify (www.sufio.com/shopify). --> | |
<script type="text/javascript"> | |
$.ajax({ | |
type : "GET", | |
dataType: "jsonp", | |
url: "/apps/sufio/customer-vat/", | |
data: { email: "{{ customer.email }}", force_tax_exempt: true } | |
}); | |
</script> |
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
<!-- Created invoices in EUR. Used by Sufio for Shopify (sufio.com/shopify). --> | |
<input type="hidden" name="attributes[Invoice Currency]" value="" /> | |
<input type="hidden" name="attributes[Invoice Currency Rate]" value="" /> |
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
<!-- Shopify checkout -- capture and validate VAT numbers and set business customers as tax exempt when applicable. Used by Sufio for Shopify (www.sufio.com/shopify). --> | |
<div class="additional-checkout-fields" style="display:none"> | |
<div class="field field--optional field--vat-number"> | |
<div class="field__input-wrapper"> | |
<label class="field__label" for="checkout_vat_number">VAT number</label> | |
<input placeholder="VAT number" autocomplete="vat number" data-backup="checkout_vat_number" class="field__input" aria-labelledby="error-for-vat_number" size="30" type="text" name="checkout[vat_number]" id="checkout_vat_number"> | |
</div> | |
</div> | |
</div> |
NewerOlder