Hi
I have two questions:
1) I use the Order printer app to print invoices/packing slips. This is an art gallery representing many artists and it would be great if the artist name/vendor was on the invoice/packing slip along with the item name. Is this possible?
2) If I wanted to show the stock inventory on the product page. What code and where would I use? (if it is possible)
Thank you in advance!
https://www.neogalleri.no/ (Norwegian site)
Hello,
Both things possible.
1) Use hidden line item field and put vendor name as value in input field. Also name your hidden field a/to your need. In this was it will go through with item name.
2) To display stock inventory, you can use this code
{% if product.variants.first.inventory_management == "shopify" %} {% if product.variants.first.inventory_quantity > 0 %} We currently have {{ product.variants.first.inventory_quantity }} in stock. {% else %} The product is out of stock {% endif %} {% else %} This product is available {% endif %}
Use this code in product template a/to your need.
Thanks
Thank you!
I managed to to do no 1) - somehow a couple of lines disapeared on the title line next tp price (Quantity, Artist, Item, Price) what can the reason be?
On no2 - Is it on the Product-template.liquid i add the script? Does it replace :
{% if current_variant.inventory_management %}
{% if current_variant.inventory_quantity < 10 and current_variant.inventory_quantity > 0 %}
{% assign qty = current_variant.inventory_quantity %}
{{ 'products.product.stock_available' | t: count: qty }}
{% elsif current_variant.inventory_quantity == 0 or current_variant.inventory_quantity < 0 and current_variant.incoming %}
{% if current_variant.available %}
{% assign date = current_variant.next_incoming_date | date: format: 'date' %}
{{ 'products.product.will_not_ship_until' | t: date: date }}
{% else %}
{% assign date = current_variant.next_incoming_date | date: format: 'date' %}
{{ 'products.product.will_be_in_stock_after' | t: date: date }}
{% endif %}
{% endif %}
{% endif %}
use url_for_vendor filter for this purpose . For example, the code responsible for displaying the vendor ( Venture theme) lies in sections/product-template.liquid. maybe on line : 87 . Replace the code as given below
I use Venture theme and Lixon_Louis gave an advice that helped me. You can use url_for_vendor filter for this purpose . For example, the code responsible for displaying the vendor lies probably in the in sections/product-template.liquid as well. Replace the code as given below
before
<p class="product-single__vendor"> {{ product.vendor }} </p>
after
<p class="product-single__vendor"> <a href="{{ product.vendor| url_for_vendor }}">{{ product.vendor }}</a></p>
User | Count |
---|---|
8 | |
6 | |
6 | |
5 | |
5 |