How to determine a customer's login status in a store using an app extension?

VishalChandola
Shopify Partner
11 0 0

How can I ascertain a customer's login status within a Shopify store using a Shopify app extension? I've developed a discount app and now seek to determine whether the customer is logged into the store or not.

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
7528 1453 1450

Hi @VishalChandola 

You can use this code to check if customer logged in 

{% if customer %}

- Helpful? Like or Accept solution! - Buy a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now

VishalChandola
Shopify Partner
11 0 0

Hi @Dan-From-Ryviu, thank you for your response. However, I am seeking to retrieve the logged-in status of a customer within the Shopify app extension I've developed. Could you please assist me with this?

Dan-From-Ryviu
Shopify Partner
7528 1453 1450

Sorry but I don't have any idea on your question

- Helpful? Like or Accept solution! - Buy a coffee
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look
- Enjoy 1 month of Shopify for $1. Sign up now