
To show Availability on quick view, you need to add some code to your theme.
Follow the simple steps below, or
contact us to help.
Step 1:
- Go to Online store → Themes → find the theme you want to add availability → Actions → Edit code.
- Under Templates folder, click Add a new template
- In the popup "Add a new template": choose
- Create a new template for: product
- called: qikify-quickview-inventory-extra
(do not change this name)
- A new template named "product.qikify-quickview-inventory-extra" is created (it might look different in each theme).
- Delete the whole code inside this file and paste this code instead:
- {%- layout none -%}
- [
- {%- for variant in product.variants -%}
- {"id":{{- variant.id -}},"inventory_quantity":{{- variant.inventory_quantity | default: 0 -}},"inventory_policy":"{{- variant.inventory_policy | default: 'deny' -}}"}{%- unless forloop.last -%},{%- endunless -%}
- {%- endfor -%}
- ]
- Save.
Step 2:
- Go to the theme.liquid under Layout
Press Ctrl+F to find the </head> tag
- Paste this script to above the </head>
- <script>
- QikifyQuickView = {
- show_availability: true,
- availabilityText: 'Availability',
- text: {
- instock: 'In stock',
- willbeinstocksoon: 'Coming soon',
- outofstock: 'Out of stock',
- onlyleft: 'Only [NUMBER] items left',
- },
- };
- </script>
- Save and Done.
Then enable the "Show product availability" in Quick View app. The Availability should show up now.
NOTE:
The color of "Only xx items left" message depends on the inventory:
- When there're more than 10 products in stock, it shows in green:
- When there're less than 10 products in stock, it shows in yellow:
- When there's 0 product in stock, it shows in red: