Hide orders box on orders page

Is there any way for me to hide the orders box (or the “You don’t have any orders yet” box) on the orders page of the customer accounts pages?

No, this isn’t possible. Can you elaborate on your use case?

I have two use cases:

  1. On a PDP I have a “sign in with” button that uses SSO to authenticate users, then creates them as customers in Shopify and signs them in with the passwordless authentication flow into Shopify. I would like them to end up authenticated on the PDP again. If I redirect them to the PDP directly, they don’t seem to be authenticated correctly. If I redirect them to the orders page and then have a frontend based redirect, they are authenticated correctly and end up on the PDP. Now I would like to remove any order related content on that page while the redirect is happening.
  2. We’re migrating from a legacy system and that means we want to show orders from that system on the orders page. When the user has orders in Shopify, this is fine. If they don’t, then it shows a “There are no orders” box and below shows the orders from the legacy system.

@Kenza_Iraki If there are other ways to solve these use cases, I’d be happy to hear about them.

For 1.: I know about the /customer_authentication/login path that allows passing a return_to parameter, but it doesn’t seem to allow passing the email as login_hint, so the user would need to enter it again (after already entering it as part of the SSO. /authentication/${shopId}/login on the other hand allows passing the email as login_hint, but doesn’t seem to initialize the session correctly if I pass the PDP as redirect_uri, because I can’t access the customer on the PDP. If I use /authentication/${shopId}/login, redirect to the orders page in the customer accounts pages and then redirect from there to the PDP, the customer is logged in correctly, but sees the order page in between, which is not nice.

@Kenza_Iraki Do you have any more ideas on this?

I’ve solved 1. by adding a full page extension and doing the redirect on there, but having to go through the customer accounts pages instead of directly to the PDP is not ideal.

  1. is still open.

Hi @endor!

What you really need is a way to pass the email via login_hint to the /customer_authentication/login route. We’ll be looking at adding this shortly.

1 Like