Skip to content

Instantly share code, notes, and snippets.

@estebandelaf
Last active February 4, 2022 12:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estebandelaf/352598066d1a6373d051c694cadfaa7c to your computer and use it in GitHub Desktop.
Save estebandelaf/352598066d1a6373d051c694cadfaa7c to your computer and use it in GitHub Desktop.
Modificaciones a plantilla del carro en Shopify
<!-- Ubicar, por ejemplo, justo después de tag form -->
<!--
Este ejemplo permite elegir boleta o factura
Si se desea sólo:
- Boleta nominativa: quitar selección de boleta/factura y giro
- Boleta no nominativa: no colocar este código (no modificar template)
- Factura: quitar selección boleta/factura y cambiar por campo hidden con value 33
-->
{% comment %}Inicio LibreDTE{% endcomment %}
<div class="row">
<div class="wrapper-cart col-xs-12 col-sm-8 col-md-9">
<div class="cart-title"><h2>Datos para boleta o factura</h2></div>
<div>
<div class="cart-attribute__field" style="float:left;width:33%">
<label>Documento</label>
<select required="required" class="required" id="documento" name="attributes[Documento]">
<option value="Boleta"{% if cart.attributes["Documento"] == "Boleta" %} selected{% endif %}>Boleta</option>
<option value="Factura"{% if cart.attributes["Documento"] == "Factura" %} selected{% endif %}>Factura</option>
</select>
</div>
<div class="cart-attribute__field" style="float:left;width:33%">
<label for="rut">RUT (obligatorio)</label>
<input required class="required" id="rut" type="text" name="attributes[RUT]" value="{{ cart.attributes["RUT"] }}">
</div>
<div class="cart-attribute__field" style="float:left;width:33%">
<label for="giro">Giro (opcional, sólo factura)</label>
<input id="giro" type="text" name="attributes[Giro]" value="{{ cart.attributes["Giro"] }}">
</div>
<br style="clear:left" />
<hr/>
</div>
</div>
</div>
{% comment %}Fin LibreDTE{% endcomment %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment