Saltar al contenido
merge.uydevelopers

Objetos /

line_item

Una línea del carrito.

Dónde está

cart.items.

Propiedades

PropiedadTipoQué es
line_item.keytextoClave de la línea (para /cart/change.js).
line_item.variant_idtextoVariante.
line_item.product_idtextoProducto.
line_item.titletextoProducto y variante.
line_item.product_titletextoNombre del producto.
line_item.variant_titletexto o nilOpciones de la variante.
line_item.optionsarray de textosValores de las opciones.
line_item.quantitynúmeroCantidad.
line_item.pricenúmero (unidades menores)Precio unitario.
line_item.final_pricenúmero (unidades menores)Precio unitario final.
line_item.line_pricenúmero (unidades menores)Precio por la cantidad.
line_item.final_line_pricenúmero (unidades menores)Total final de la línea.
line_item.skutextoSKU.
line_item.urltextoLink al producto con la variante.
line_item.imageimage o nilImagen.
line_item.requires_shippingbooleanoSi necesita envío.
line_item.max_quantitynúmero o nilMáximo que se puede pedir (según el stock), si hay tope.
line_item.productobjetoid, title, handle, url.
line_item.variantobjetoid, title, price, sku.

Ejemplo

{% for item in cart.items %}
  <tr>
    <td>{{ item.image | image_url: width: 120 | image_tag: alt: item.product_title }}</td>
    <td><a href="{{ item.url }}">{{ item.product_title }}</a> {{ item.variant_title }}</td>
    <td>{{ item.quantity }}</td>
    <td>{{ item.final_line_price | money }}</td>
  </tr>
{% endfor %}

← cart · linklists →