Theme development workflow for a Plus B2B

Ryan_Foote1
Shopify Partner
17 0 0

I'm having some trouble/missing some crucial step(s) when using the CLI tools to develop & test a theme for a Plus B2B shop.

 

With D2C shops, the "theme dev" command can be run and the CLI tools make a development version of the theme available at the local development URL. Easy, no fuss.

 

Running that same workflow with a B2B shop, the CLI starts up the development theme as usual, but then in the browser I'm routed through the B2B/OTP login experience and that link to the development theme seems to get lost in the process and I end up on the live shop or our sandbox shop used for testing.

 

Is there one or more extra steps needed when running "theme dev" for a B2B shop theme?

Replies 4 (4)

Liam
Shopify Staff
2731 302 777

Hi Ryan,

 

Just to confirm are you looking to view the different B2B contexts of a theme when generating a development theme with the CLI?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Ryan_Foote1
Shopify Partner
17 0 0

Hey Liam,

 

I'm speaking to the development workflow when developing a B2B theme, specifically.

 

When the "theme dev" command is run via Shopify's CLI tool and an in-development theme is made available for preview at http://127.0.0.1:9292, I get routed through the typical B2B OTP sign-in process. Along the way, http://127.0.0.1:9292 is cast aside and I end up on the live theme of the shop specified with the --store flag.

 

This process organized into an order of events looks like:

 

  1. Hit http://127.0.0.1:9292 in browser
  2. Redirected to OTP login screen
  3. Login
  4. Redirected to https://my-sandbox-shop.myshopify.com instead of back to http://127.0.0.1:9292 where the development theme can be previewed.

Net result is that I can't preview any changes that have been made to the theme without first deploying them into production, which is not a workflow that I want to undertake. Of course access to other benefits like hot reload are lost at that point, too.

 

Since my original post, I did realize that I can use the shareable preview URL of the theme in development, but that's not really ideal as hot reload also doesn't work when the theme is viewed via that method.

Liam
Shopify Staff
2731 302 777

Hi Ryan_Foote1,

 

I see what you mean - let me dig into this a bit further with our internal teams to see how this developer experience could be improved. 

 

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

maticknap
Shopify Partner
3 0 0

Having the same issue. Is there some solution for this?