Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout liquid template not updating on theme #9

Open
OwenLD opened this issue Jan 23, 2020 · 8 comments
Open

Checkout liquid template not updating on theme #9

OwenLD opened this issue Jan 23, 2020 · 8 comments

Comments

@OwenLD
Copy link

OwenLD commented Jan 23, 2020

When saving the checkout.liquid file locally it queues and gets added without any errors but it doesn't update the file on the shopify store.

Other files in the layout folder are updating as expected (theme.liquid etc).

Any idea as to why this is happening?

@tmslnz
Copy link
Owner

tmslnz commented Feb 10, 2020

That may be because you are not a Shopify Plus customer?

@OwenLD
Copy link
Author

OwenLD commented Feb 12, 2020

The store I am working on is a plus store.

The specific gulp task looks like this:

/* Paths */
const paths = {
    copy: {
        src: ['src/{layout,config,snippets,sections,templates,locales}/**/*.*', '!src/config/settings_data.json'],
        watch: ['src/{layout,config,snippets,sections,templates,locales}/**/*.*', '!src/config/settings_data.json'],
        dest: 'dist'
    }
};

/* Copy */
function copy() {
    return gulp.src(paths.copy.src)
        .pipe(changed(paths.copy.dest))
        .pipe(gulpif(destCheck, embedSvg({
            root: 'dist/assets',
            selectors: '.inline-svg'
        })))
        .pipe(gulp.dest(paths.copy.dest))
        .pipe(theme.stream());
}

The copy function is then part of my watch/deploy tasks.

Which both run without erroring when editing the checkout.liquid locally.

The output in the terminal looks like this:

[13:55:41] Starting 'copy'...
[13:55:41]   gulp-shopify-theme   queued: layout/checkout.liquid
[13:55:42]   gulp-shopify-theme   added: layout/checkout.liquid
[13:55:42]   gulp-shopify-theme   Done
[13:55:42] Finished 'copy' after 562 ms
[13:55:42] Starting 'browserSyncReload'...
[13:55:42] Finished 'browserSyncReload' after 274 μs

Can you think of any other reason why this might not be working?

@tmslnz
Copy link
Owner

tmslnz commented Feb 12, 2020 via email

@OwenLD
Copy link
Author

OwenLD commented Feb 13, 2020

I've just tested the API call with cURL and a very simple checkout.liquid file, which looked like this:

<!DOCTYPE html>
<html>
    <head>
        {{ content_for_header }}
    </head>
    <body>
        {{ content_for_layout }}
    </body>
</html>

The API call with cURL works as expected and the file updates on the theme.

However, using the exact same content with gulp doesn't seem to do anything but also doesn't error (same output as above).

Strange that this is only an issue with the checkout.liquid file... I can't find any information about it requiring any special behaviour.

Would be interesting to know if anyone else is having the same issue.

@tmslnz
Copy link
Owner

tmslnz commented Feb 13, 2020 via email

@OwenLD
Copy link
Author

OwenLD commented Feb 14, 2020

Could be, I am not sure to be honest.

I wouldn't really know how to start debugging this.

Sorry I can't provide more information.

@MrSpecific
Copy link

@OwenLD - I just wanted to jump in and confirm your experience. We have a theme that uses Gulp Shopify Theme and we experience the EXACT same behavior. We have not been able to troubleshoot it, either, so we resort to using ThemeKit directly for that, or copy/pasting the file contents into the online editor.

@nijotz
Copy link

nijotz commented Mar 26, 2021

I'm encountering this too. I debugged this and it turns out the Shopify API is returning a 200 for the asset update call. This library calls out to the Shopify API here and then the Shopify API is making the request and getting a response here. I checked the response we were getting and it's a 200, normal JSON body, no errors, but the template is not updated in the Theme Editor..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants