Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey Community,
Perhaps someone has encountered that when using init.data.customer.OrdersCount parameter always returns 0?
I've tried several variations on several shops and it always returns zero, even though the account has a lot of orders.
Here's what I used for the tests:
And the result is always 0, both on purchase and on other events:
Any tips would be appreciated
The init.data.customer.ordersCount returning 0 might be due to timing or data availability issues. Ensure that the init object is fully loaded and the customer data is accessible before trying to retrieve the order count
If this fixed your issue, likes and accepting as a solution are highly appreciated
| Build an online presence with our custom-built Shopify Theme: EcomifyTheme
| Check out our reviews: Trustpilot Reviews
| We are Shopify Partners: EcomGraduates Shopify Partner
Thanks for pointing it out for this and your reply!
I've checked, that's definitely not the problem, all other init data works without problems.
Perhaps there are more ideas?
I'm facing the same issue...
Hi @Epats,
it seems that the "ordersCount" doesn't work when the Bogus payment gateway is used.
The suggestion from the Shopify support is to use Cash on delivery payment gateway on test stores.
The "ordersCount" is working as expected on production stores.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024