I have a div I want to display on the product detail page when a given product has two custom fields that contain a particular value. For example, every product in my catalog has the following custom fields
- InventoryInStore
- InventoryOnOrder
I want to conditionally display a div element when a product's InventoryOnOrder > 0 AND it's InventoryInStore = 0. Any help on how I can get something along the lines of the following snippet to work would be greatly appreciated!
{{#each custom_fields}}
{{#if (toLowerCase name) '===' 'inventoryonorder'}}
{{#if value '!=' 0}}
{{#if (toLowerCase name) '===' 'inventoryinstore'}}
{{#if value '===' 0}}
<div>element A</div>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/each}}
Thank you in advance for being smarter than I :) Cheers!