Get order count from Product object

Solved
Highlighted
New Member
1 0 0

Hi, I want to extract the number of order count for a particular product in the product-list-item.liquid file. When I looked into this file, it seems like we can only access the Product object, with their attribute listed here.

The reason behind this is that we want to display the % of the current order amount against the target order number. When the order reached a certain amount, we will satisfy and ship the orders. Else, we will refund to the customers.

Is that possible to access the total order count from Product object or product-list-item.liquid?

Thanks

0 Likes
Highlighted
Shopify Partner
372 44 75

This is an accepted solution.

Hi,
Actually its not possible to get order count directly but you can do some math and show numbers.
For ex. You set inventory quantity to 100 and now available 80. so display 100 - 80 = 20(orders)
You need to set initial quantity in metafield to use in liquid file

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
Give a try to Shopify APP: https://apps.shopify.com/checkout-reminder
0 Likes