Skip to content

Instantly share code, notes, and snippets.

<script type="application/ld+json">
{
"@context": "http://schema.org/"
{% case template %}
{% when 'product' %},
"@type": "Product",
"name": "{{product.name | escape}}",
"url": "{{store.url}}{{product.url}}",
"itemCondition": "http://schema.org/NewCondition",
{% if product.sku != blank %}"sku": "{{product.sku}}",{% endif %}
function autocomplete(value,input){
var interval = setInterval(function(){
console.log("#"+input)
if($("#"+input).text()){
$("#"+input).val(value);
clearInterval(interval);
}
}, 500)
}
var remove_payment = function(data) {
var order_product_id = payment_cost_order_product_id(data);
Jumpseller.updateCart(order_product_id, 0); // no payment cost on the order.
}
function payment_cost_order_product_id(cart_json) {
var id = null;
$.each(cart_json.products, function(i, order_product) {
if (order_product.product_id == productId) { // product for adding payment cost. You need to create a virtual product with the additional price. The ID is the number in the URL of the product in the admin panel.
function hideShow(){
if($("#order_shipping_address_region").val() == "12"){
$("#shipping_options input[value='143029']").parent().siblings().hide();
$("#shipping_options input[value='143029']").parent().show();
$("#shipping_options input[value='143029']").click();
}else{
$("#shipping_options input[value='143029']").parent().siblings().show();
$("#shipping_options input[value='143029']").parent().hide();
$("#shipping_options input[value='144303']").click();
}
{% if customer %}
Precio: {{product.price | price}}
{% else %}
<a href="/customer/login">Regístrate para poder comprar</a>
{% endif %}
{% if customer %}
Código que quieres mostrar a tus clientes logeados.
{% endif %}
{% if order.email != "EMAIL" %}
/// Content of the page.
{% endif %}
{% assign FBT = order.products.first.field["Frequently Bought Together"].value | split: "," %}
<div class="row nogutter">
{% for prod in FBT %}
{% assign product = products.product[prod] %}
<div class="col-md-3 col-6">
<div class="main-category-image">
{% include 'list_product' with product %}
</div>
</div>
{% endfor %}
function international(country){
if($("#order_shipping_address_country").val() == country ){
$("input[value='127765']").parent().hide(); // International
$("input[value='43917']").parent().show(); // Chile
$("input[value='43914']").parent().show(); // Chile
$("input[value='43915']").parent().show(); // Chile
$("input[value='43916']").parent().show(); // Chile
$("input[value='43914']").click(); // Chile
}else{
$("input[value='127765']").parent().show(); // International