Printful EDT not Showing Up On Shopify - Studio Theme

COTM
Tourist
7 0 2

I just spent 3 hours online with Shopify Chat. They could not find a solution. So here goes.

I have Printful in the Studio theme. Everything works with Printful except the EDT. 

1. Yes, I set it up correctly on Printful and followed all their directions to the letter.

2. Yes, everything from Printful works on the site except the EDT box will not show up on products. 

3. When I could not find any answer, I went online with Shopify help. They went through all the possibilities, as I had done. They even put the Dawn theme on to see if it was a problem with another app or the Studio theme.

4. None of their teams could figure out the answer to why the EDT box won't show up on Shopify.

 

My feeling is that some trigger is not working in the liquid code, as Printful does not work with Blocks. But it could be some setting. According to Printful documentation, it is set up and confirmed. I think this is coming from the theme code or somewhere else, but who knows?

 

Does anyone have a solution for this?

Code or otherwise?

It would be greatly appreciated!

 

Replies 10 (10)

Liam
Shopify Staff
2731 299 769

HI COTM,

 

Do you know how Printful is integrating with Shopify themes? eg: are they sending the estimated delivery time to the product page using a theme app extension

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

COTM
Tourist
7 0 2

Hi Liam,

printful has an app that integrates automatically with Shopify. There are no blocks. They add a section of code into the “theme.liquid” file. I checked this on Studio and it is all there. 

In order to implement the ETA you simply really simply do the following- look there

Printful Article On How To Set Up ETA 

 

I have done this. Again and Again. Always comes back with Success.

Next:

I spent 3 hours online with Shopify. They actually created a new version of my shop in Dawn and tried it out. No go. ETA does not appear.

At the end, and they were very helpful, the service person agreed something was not right, and we went through every possible iteration. She suggested I post here.

Then, I contacted Printful. Printful as well was helpful. But they could not figure it out and attempted to blame it on Studio. I returned with a dump of the Liquid code sections and showed them what they claimed was indeed not missing. They pushed it up to developers as they agreed my shop is set up 100% correct.  

In other words:

  1. Printful integrates by altering the Liquid code as far as I can tell and they handle the entire structure with one section in the file mentioned above. 
  2. There are no blocks to add or play with.
  3. Everything else from Printful works perfectly when integrated with my store. This is the only thing that won't show up.
  4. In a search, there are some places where people complain about the same problem, but no solutions are offered.

MHO

Something in their code block is not being triggered, or some "hidden" non-documented setting is not defined. Or their code wont work with Studio or Dawn - which I simply cannot believe - as those two themes are used my millions and if the ETA of Printful did not work, there would be a huge mess of answers to find.

That is all I can tell you.

Hope someone in Shopify can find an answer to this.

 

Thanks for reaching out.

Teddy

 

Liam
Shopify Staff
2731 299 769

Can you share the code (ideally just the part of the code that is related to the estimated delivery date) that Printful is adding to theme.liquid. It sounds like the app may be using scripttags or injecting code straight into theme files which is not ideal (but should also still work). 

 

Also, if the EDD should be showing up on the product page, I'd expect the code to be added to a product section file rather than theme.liquid?

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

COTM
Tourist
7 0 2

Here is the code section from the theme.liquid

<!-- PF EDT START -->
<script type='text/javascript'>
{%- if content_for_header contains 'shopify-product-customizer' -%}
    {%- if product -%}
        {%- if product.first_available_variant -%}
            var pfProductId = {{ product.metafields.printful.is_synced | json }};
            var pfEdt = {{ shop.metafields.printful.is_edt_enabled | json }};
            var pfEdtTextColor = {{ shop.metafields.printful.edt_text_color | json }};
            var pfEdtBackgroundColor = {{ shop.metafields.printful.edt_background_color | json }};
            var pfEdtBorderColor = {{ shop.metafields.printful.edt_border_color | json }};  
            var pfEdtUseDefaultStyling = {{ shop.metafields.printful.edt_default_style | json }};
            var pfEdtTextAlignment = {{ shop.metafields.printful.edt_text_alignment | json }};
            var pfEdtFlags = {
                US: "{{ 'US.svg' | asset_url }}",CA: "{{ 'CA.svg' | asset_url }}",ES: "{{ 'ES.svg' | asset_url }}",LV: "{{ 'LV.svg' | asset_url }}",GB: "{{ 'GB.svg' | asset_url }}",DE: "{{ 'DE.svg' | asset_url }}",FR: "{{ 'FR.svg' | asset_url }}",AU: "{{ 'AU.svg' | asset_url }}",JP: "{{ 'JP.svg' | asset_url }}",NZ: "{{ 'NZ.svg' | asset_url }}",IT: "{{ 'IT.svg' | asset_url }}",BR: "{{ 'BR.svg' | asset_url }}",KR: "{{ 'KR.svg' | asset_url }}",NL: "{{ 'NL.svg' | asset_url }}",GB: "{{ 'GB.svg' | asset_url }}",US: "{{ 'US.svg' | asset_url }}",
            };
        {%- else -%}
            var pfEdt = 0;
        {%- endif -%}
    {%- endif -%}
{%- endif -%}

 

Interestingly the product.json file does not contain anything for Printful. But it does contain injections from other apps.

As for the rest, if you give me an idea as to which file to look at, as there are an incredible amount, I can check.

This is all done through my own research, no one would tell me where to find the code. 

Which product section file?

 

 

Liam
Shopify Staff
2731 299 769

Hi again COTM,

 

So what looks like is happening is that there is a conditional script running on every page (the theme.liquid file is a "wrapper" that is used to load each page of a Shopify store) and if the page is a product page then the rest of the code will render on that page. This is likely why you're not seeing code from Printful on the product.json file as this is an older method for interacting with Shopify themes. 

 

Then a bunch of variables are being created and stored as metafields, which are related to when and how the EDT component should be displayed (is_edt_enabled likely controls turning on/off the component and there's metafields for storing colours/layout options for display). The actual HTML / Liquid for the component isn't in this file though, it could be in a main product section or a a product related snippet file. 

 

One thing you could ask Printful is when the activation of the EDD component is triggered, what logic is used to add the component to the theme - eg: is the app using the Asset API to inject code into a `main-product.liquid` section which then accepts the variables that you found set up in theme.liquid. If you can find out what logic the app is using to add the code, then you can find out if that logic is not compatible with how your theme is structured. You could also ask Printful if they are seeing any API calls failing with an API call is made to integrate the EDD component. Of so the API error should have an error message or a message header code for finding out more. 

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

COTM
Tourist
7 0 2

Liam:

First let me thank you. 

Printful left an open line with me via email (kind of surprising!) And I have been emailing with them since yesterday.

I copied your answer, and asked my contact there to get it to the developer team.

As to your instincts. 

There is no implementation of the EDT - Printful system in the  “main-product.liquid” file.  Indeed the only place I can find it is in the main liquid file. 

So I think your instincts are spot-on.

What they did was inject that code into the file, and perhaps before 2.0 themes that was enough. What they have not done is trigger the implementation is the necessary files. 

It is a mystery to me how this is not something that more people have not complained about. Considering Shopify _+ Prihtful both are huge companies and both have thousands of users in both systems using that plugin, I cannot fathom why this has not been discovered and solved a long time ago.

Most users who have complained simply gave up. 

I am not giving up 🙂

It is a simple answer and probably could be solved within 15 minutes by the developer(s) who created that plugin.

I will keep you informed, and if you have any other ideas, shoot them my way.

 

Once again, I thank you for all your help.

COTM-Teddy

Liam
Shopify Staff
2731 299 769

Please let me know what you find out from Printful - I believe there should be logic set up in the app that adds the HTML and Liquid parts of the EDD component to the `main-product.liquid` section so that it appears on the product page. It's also possible that they can share the markup of the component with you so you could manually add it in, if the injection method is not working for some reason. You could also ask them to share a model implementation with you - where this is working on a Shopify store, as the image in the tutorial may not be relevant for a theme build with JSON templates / online store 2.0. 

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

COTM
Tourist
7 0 2

Liam:

I will let you know as soon as I get an answer. That is for sure.

I already told them they could dump the code in an email to me and give me exact instructions on where to dump it to test it.

I very much doubt they will do that, though. But one can only hope.

 

 

COTM
Tourist
7 0 2

Liam, I promised you an answer; as I said at the beginning, it was something simple. 

I had just put this whole thing aside and went back and forth with Printful in email who were always very helpful. When their developers swore that it works in 2.0 themes I had to solve it. So around and  an hour ago 12:15 AM my time (this is important) I got an email confirming that it works.

I was just about to go to sleep, but now I had to figure this out. So I opened the Mac, and started reading everything Printful had on the EDT. and I see in small print that EDT is only available in a specific list of countries.

DUH! Light bulb goes off.

I live in Israel, not on those list of countries.

Fired up the VPN came in from the UK and VOILA - EDT appears!

just like that. Easy peasy. Simple.

I was not seeing an EDT because my IP was in a country they do not supply the delivery time. 

Thanks for all your help.

knew  it was a simple answer.

now I am going to bed!

COTM
Tourist
7 0 2

I should also mention that I implemented a generic Liquid Code solution on these products until I find a solution, but it is not optimal nor true to date. So it is just there to instill trust in customers.