Issue Displaying Product Weight on Custom Shopify Packing Slips / Problema peso en packing

Sibari
Shopify Partner
8 0 0

I am experiencing an issue with displaying product weights on custom packing slips. I am using the 'line_items_in_shipment' loop to iterate over shipment items, but the variable storing the weight ('grams') always returns zero or does not display any value, despite the weights being properly set in the product database.

Interestingly, if I use the 'line_items' loop in another context, I am able to retrieve and display the weights correctly. Here is a snippet of the code I am using within the 'line_items_in_shipment' loop:

 
{% for line_item in line_items_in_shipment %}
<p>Product: {{ line_item.title }}</p>
<p>SKU: {{ line_item.sku }}</p>
<p>Weight: {{ line_item.grams }} g
</p> {% endfor %}

Has anyone else faced a similar issue or knows why this value is not displaying correctly when using 'line_items_in_shipment'? Any suggestions to resolve this issue would be greatly appreciated.

Thank you in advance.

Estoy enfrentando un problema al intentar mostrar el peso de los productos en los packing slips personalizados dentro de Shopify. Estoy utilizando el bucle 'line_items_in_shipment' para recorrer los ítems de un envío, pero la variable que almacena el peso ('grams') siempre retorna cero o no muestra ningún valor, a pesar de que los pesos están correctamente configurados en la base de datos de productos. Curiosamente, si utilizo el bucle 'line_items' en otro contexto, sí logro obtener y mostrar los pesos correctamente. 
¿Alguien ha enfrentado un problema similar o sabe por qué este valor no se muestra correctamente cuando se usa 'line_items_in_shipment'?
agradezco vuestros comentarios

Reply 1 (1)

Dirk
Shopify Staff
2301 253 514

Hey, @Sibari 

I'm confident one of our Shopify experts would be able to help accomplish this at a reasonable price.
 
Just wanted to share this as an option in case you are unable to find a coding solution in your thread.

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog