Is it possible to customise checkout liquid with an App - shopify

I bought a shopify plus to customise my checkout page -add some html and JS to the checkout template- and I read this in the shopify documentation :
If you're on Shopify Plus, then you can edit the code for your checkout. However, if you make changes to your checkout code, then you need to upgrade your checkout.liquid template manually whenever Shopify makes an upgrade.
and I was wondering If it's possible to create an App to do that for me.
I mean :
1-Create an app to modify the checkout page.
2-After each update my app modify it automatically or at least I just re install my app and the checkout will be updated.
I already have shopify plus and managed to do that by modifying the checkout.liquid.
But It's not really an efficient way to change the checkout.liquid each time might be ok for one user but what if I want to do the same for a lot of shopify users for example.
It's a Basic concept making a plugin in other ecommerce platforms such as Prestashop, Magento ... But It seems really complicated in Shopify.
Please Help.

If you're on Shopify Plus, then you can edit the code for your
checkout. However, if you make changes to your checkout code, then you
need to upgrade your checkout.liquid template manually whenever
Shopify makes an upgrade.
This statement means that whenever Shopify introduces some changes on their end in the Checkout process they will notify you prior to update. 30 days prior as far as I know so that you can update and test. They will provide you details for changelog so that you can verify if it does break any of your customizations. Such changes are not frequenet and I cannot think of any automated way that your app will be able to analyze the changelog and decide if it affects your customizarions or not.
Since most of your changes will be in additional JavaScript it won't be much of an effort for you and will not be as frequent.
However, if you manage many stores for multiple Shopify plus customers then you may push an update manually to all stores that have your APP installed and make use of Assets API to modify checkout.liquid file.
For example, if Shopify notifies you that Checkout code is changed and you need to update it. Just review the changelog, then initiate a process on your APP backend that updates the new code to all chekout.liquid files on all the stores where your app is installed.
Assets API
Checkout Customization

Related

How to edit different shopify storefront with one script from Shopify app

My Shopify app needs to edit storefront to change existing element. There are two ways to change storefront code in Shopify
Edit liquid theme file
Add client side JS with Asset API
However, different merchants use different themes in their stores. Is there any way my app works with every theme or how can I write a script which supports maximum themes? It would be very helpful if you can give some hints or share your thoughts about this issue.
After searching more about this issue I got some insights like Unfortunately we can't edit different theme with same script, because each theme might be very different. Some themes might even have different filenames for this sections or they might have completely different HTML structure.
There is no easy and universal way how to solve this problem. One of the ways:
You can do some heuristic in the theme files and try to find a correct place where to insert your code. For example, langify is doing that. It's scanning the whole theme and finding places where to insert their code.
You can ask a customer to add your code manually. Many apps are doing that because it will cause fewer errors. You just need to prepare detailed manual how to set it up properly.
You are wrong, exist more ways.
on storefront 2.0 you can create a theme app extension this is the recommended way today.
UPDATE: On 2.0 you should recommend your customer to replace their section with your section, this is currently the clean and recommended way to do.
On 1.0 well depends a lot on your project complexity or the part on the code your app touch...
Many apps use the theme Rest API, with that you can add on your app installation script a step for downloading the published theme. After that 2 options:
You can search and replace something specific, you can write a script then read the theme files and replace what you need to be replaced, then do the change automatically and republish your changes on the store. Faster no human intervention
use the downloaded code to easily read and replace manually the code using an IDE and after manually upload your changes using the same API. slow, need human intervention but more flexible.
You can start with option 2 now and continue to develop the script for option 1.

Shopify - how to extend a checkout page in app?

I would like to create a Shopify app that adds an additional section to the checkout page - a possibility to select the delivery time window. I know that such apps already exist but I want to use my own application server to generate the values that can be selected.
What is the best way to approach this? I've spent last 2 days browsing shopify documentation and following various tutorials but I'm still confused. I thought that application bridge would be the way to go but after playing with it a bit it seems that it only allows to embed application frame in the admin panel, not on the checkout page.
Should my app send a script tag that would call my server and add the whole slot selection UI in javascript? Or should I maybe modify the templates somehow? Can I even make AJAX requests to third party servers from templates?
I would appreciate any advice.
Shopify revealed that there will be a Checkout Apps support soon, but that time isn't now.
So at the moment the Checkout page is standalone and you can't use the ScriptTag API in it.
If you are on a Shopify Plus account and you contacted Shopify to allow you to modify the checkout.liquid file you will be able to add your section manually.
With some additional JS logic you can pass the delivery time to the cart.attributes so that it will be present in the order info. But that's pretty much what you can do and only if you have a PLUS account.
If you plan to make larger modifications you will have to create an App that will have a custom checkout process... which will be a huge overkill for adding a single section, but that's a solution as well.

Launching a new Shopify theme and the best approach

I am seeking guidance on the best way to introduce a new theme onto an already complex e-commerce Shopify website.
I am new to the Shopify go-live process, this is the first time I am going to launch a new theme that I have built. I understand the building process and could do with some clarification on the go-live steps.
The job:
A complex e-commerce company has had us build a new design and way of navigating through to product pages. Introducing new collections and tags. There are also new pages and will be a dramatic change to URLs from an SEO point of view.
The store will remain in the same place, on their server, the same domain name, in their control.
I need to be able to provide them with an importable version of our development store, with guidance on how to push this live without breaking and allowing us to test the site on the live-server before opening it up to the users.
The implementation:
I have created the store, the pages, the collections, the tags, all the bells and whistles.
I have uploaded their latest database of products onto the development store and set these up into the collections and store filters.
The question:
How do I put this live onto the old store with the least down-time & having the ability to test the newly created store before customers can see it?
The break-down of the question:
What files need packaging? What is the easiest way to package up these files for the client company? What is the best way to install the packaged files? What is the best way to test the website?
One last concern:
Is it possible to keep the existing stores orders and customer user profiles?
You can preview the theme and populate data from each Section (if theme you make is a sectioned-theme). You can compiled the theme from you development and upload to their store, you don't have to send it live.

Single page checkout for shopify

Kindly please suggest me the best way to single page checkout for Shopify store. As Shopify doesn't support any customization to the checkout page. Our requirement is to create a single page checkout. let me know how it is achievable.
Basic Shopify does not support customization in the checkout page. It is only available to Shopify plus Customer. Please visit here for more information.
You want a single page checkout you may need to create your own checkout process which will again require your store to be a Shopify Plus store. However, there are many Apps which can help you with single page checkout. You may want to use one of them if you don't want to build the whole functionality. You may want to check the below conversation - Link
You should not use Shopify if you want to make your own Checkout. Shopify is a hosted platform and they no longer want to let people play with the cash register themselves.
Of the few Apps that remain that do offer checkout outside of Shopify, you can see the hassles involved for customers. Why not just roll your own? If you can do your own checkout, hook up to an open source system instead where you can do that easier.
This is easy enough to do if you have the skills. Basically create an app that has a proxy page and change the theme's links replacing the paths to the checkout with paths to your proxied checkout.
There are a number of ways to collect payment info if you do this including using the draft_orders api to send the customer back to Shopify for final payment (not applicable for single page checkout but sometimes works well with the business reason that justifies a custom checkout in the first place)
You can also create a sales channel app that works much like the proxied app concept but has some more api capabilities.
However you really need a good business reason for doing this. Single page checkout was fashionable a few years ago but I've had as many customers go away from it as go towards it. Shopify has done quite a lot of work on their checkout and it works well (i.e. is fast and efficient) on all their supported platforms. Creating a custom checkout means your stuck maintaining it and are potentially increasing your liability if you take credit cards but have not received PCI certification.

Shopify Webhooks for Bulk Product Update

I set up a development shop on Shopify to test webhooks. I'm using this for proof of concept to update an external system whenever a product changes within Shopify. All seemed to be working as intended until I tried using the bulk product edit feature(the tool, not the csv import). I'm not receiving any webhook posts on bulk update.
I have several webhooks set up for various triggers, and they are all seemingly working. The product/update webhook works if I edit the product or its inventory individually, but not if I use the bulk edit tool.
I actually had 2 separate product/update webhooks going to 2 separate URLs, but I removed one of them just to be sure that wasn't causing any conflicts. I also tried chat support on Shopify, but they actually referred me here.
I really need for this to work as I'm not being given enough time to develop an API app to accomplish this.
Thanks for bringing this up! Those webhooks should now fire consistently when using the bulk editor.