Product field: location

piotrsznajder
New Member
6 0 0

Hi I have used custom field app, and created a code for displaying the shipping information:

 

{% if product.metafields.custom_fields["shipping_information"] != blank %}

This product usually ships within {{ product.metafields.custom_fields["shipping_information"] }} weeks.
{% else %}
This product usually ships within 1 week.    ->>>  I want to refer to field {{location.name}}

{% endif %}

 

But unfortunately this reference to location name do not work. I have checked if I typed proper name of the field but do not have idea hove the location name is called in dev environment. For sure the {{product.title}} works correctly so the problem is how to refer to location field.

 

Any suggestion??

 

 

0 Likes
piotrsznajder
New Member
6 0 0

Probably I need to get the information about location by API

 

 GET /admin/api/2021-07/locations.json

 

Can you help me  ??

I only need to display the location name on my product page  

0 Likes