Get last sale date of a product

Highlighted
New Member
2 0 0

Is there any way we can access the timestamp of the last sale on product template?

0 Likes
Shopify Partner
395 27 56

Hi @asquaredagency,

 

Not by default no. The product liquid object does have tags, so you can create a script that updates the product tag on each sale. Here's some reference:

 

https://shopify.dev/docs/themes/liquid/reference/objects/product#product-tags

 

https://shopify.dev/docs/admin-api/rest/reference/products/product#update-2020-04

 

Something like LAST_SOLD_AT_2019_09_13

 

Then match it and parse it in your product-template.liquid 

 

Regards,

 

Sam

Custom Apps and Theme Support | Email us: hello@achieveapplabs.com | Follow us on Twitter @achieveapplabs | Hosted solutions | Lifetime support
0 Likes