Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.45k stars 277 forks source link

Multiple issue with Shopify Checkout #1203

Open dhaval-bright opened 1 year ago

dhaval-bright commented 1 year ago

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

1.5

What version of Remix are you using?

No response

Steps to Reproduce

  1. When I go to the checkout page from my hydrogen store - https://clean1885.com/ & When I click on Logo or cart link then it will open in a new tab. But for a normal Shopify Store, it will open in the same tab in the browser. So why this difference comes? This is same issue happen in https://hydrogen.shop/ https://www.awesomescreenshot.com/image/42026622?key=8943647d880b7e87ca7f0c4828f7b772

  2. In the Normal Shopify store, if I'm login as a customer & go to the checkout page then the address & some other things come with pre-fill & it is also seen that you are login with a customer email address but this is not happening with my hydrogen store. So is this possible with hydrogen or not? I also want to same pre-fill functionality for my store. https://www.awesomescreenshot.com/image/42026733?key=f586d044b64c68cf5b1adc82b3fed2c4

  3. Market region-specific Custom-Domain is not working with the hydrogen store. If I set the https://clean1885.at/ domain for Austria in Shopify Markets.

If the customer comes from the https://clean1885.at/ domain then on the checkout page Can we keep the same domain https://clean1885.at/ on Logo & cart link OR on the address bar instead of the main online store primary domain (https://checkout.clean1885.com) for Hydrogen store? If we set up the same thing for the Normal Online Store Sales channel then https://clean1885.at/ domain will come on the address bar & also comes on Logo & cart link. So how can we fix this issue for the Hydrogen store? I have shared my loom video for this issue, but currently, we do not have the same settings. It was kept only for recording videos. https://www.loom.com/share/4d7d4d9091814ee4825c096c8a2ffa77

Expected Behavior

  1. Tab Need to open in the Same tab
  2. if the customer login in hydrogen storefront then the customer details like email, address also needs to come on the checkout page like the Normal Shopify store
  3. Market domains need to working same like normal Shopify store

Actual Behavior

  1. When I click on Logo or cart link on checkout page then it will open in a new tab
  2. if I'm login as a customer & go to the checkout page then the address & some other things not show or not pre-fill on checkout page
  3. Market region-specific Custom-Domain is not working with the hydrogen store
rub1e commented 1 year ago

Point 3 - I'm having a similar issue with the Hydrogen checkout - the url returned from cart.checkoutUrl points to our base Hydrogen domain (my-hydrogen-site-123abc.myshopify.dev/cart/cn/456def), which returns a 404.

My solution is to change the checkout URL to point to our primary domain - my-primary-domain.com/cart/cn/456def.

But then we have the same issue as above, the user comes from a .eu domain to a .com domain, which is non-ideal.

Could this be related to having both Online Store and Hydrogen active at the same time?

wizardlyhel commented 1 year ago

Hi, these are good questions.

For clicking on checkout link should open in same tab, we'll need to investigate. For logged in customer going to checkout, this is a known limitation and will be solved by the new Customer API. For market region specific custom domain logo in checkout, we'll need to investigate

contrebande-labs commented 1 year ago

Point 4 - On top of opening in a new tab, one has to put hacky nasty redirects in the Liquid theme to send the customer back to the Hydrogen store from any link in the checkout that points to the Liquid "Online Store" channel (the logo is ok, but the cart icon links to the Online Store channel and not Hydrogen). This is an issue that adds to the impression that the Shopify Checkout is not compatible with Hydrogen storefronts.

We don't have issue with country or language set in the Hydrogen store transfering to the Checkout. But we are using path based locales and not domains.

Hope this helps moving this issue forward.

johnark88 commented 8 months ago

Just curious if there are any updates from Shopify on this? Just went live and we are still getting a new tab on logo click from checkout, but at least it goes to our base URL. Thanks!

The current element <a href="https://OUR_STORE.com" target="_blank" rel="noopener noreferrer" aria-describedby="forwarding-external-new-window-message" class="s2kwpi1 _1fragemir _1fragemr7 _1fragemrg s2kwpi3 _1fragemqy _1fragemr2"><img src="CDN_LOGO_URL" alt="" width="187" height="44.506" class="hmHjN"></a>

Zn4rK commented 6 days ago

Can we get an update on this? There does not seem to be a way to configure the logo url on the checkout pages when using multiple domains.

Customer checks out from .se-domain -> correctly localized checkout. Clicks on the logo -> goes to the .com-domain and has no cart anymore.

Zn4rK commented 6 days ago

At least have the logo go to the checkoutDomain, and then the Hydrogen Online Store Liquid theme can manage the redirect. That's possible to localize.

Or, let us set it when the cart session is created.

Or, let us customize it via settings.

Or, let it use the market settings.

This really needs to be fixed.