How To Add An Additional Value To A Shopify Checkout URL?
My client's live Shopify setup has a feature where a URL goes to a sort of "quick checkout" that allows a customer to quickly purchase a single item. The way it works is, you first visit a URL like this:
and then you are immediately redirected to a URL like this:
And then on that second URL you can fill out the checkout form to purchase a single item that is displayed there. Notice that the two URLs use a different domain name. The
x's are numbers, the
y is a number. The
a's are numbers and the
b's are hexadecimal digits(0-9, a-f).
Is this a common/documented URL flow for a Shopify single item checkout setup?
What I need to do is add a value to the first URL so that it carries through to the second URL, eg:
And then if the second URL has the extra value I need to do something extra in the code.
Shopify has some information on how to do this here: https://help.shopify.com/en/themes/customization/cart/use-permalinks-to-preload-cart#conversion-tracking
To summarize, you can add a cart note and an arbitrary number of cart attributes to your link as query parameters to the end of your direct-buy link.
The structure of such a URL is thus:
I just confirmed that this does indeed work by placing a test order this way on my dev store - if you're still having any trouble, let me know and we can dig deeper.
- → OctoberCMS Plugin update url
- → How do i get base url in OctoberCMS?
- → Display different sidebar content based on page url - October CMS
- → .htaccess - not routing to public folder
- → Redirect wrong url laravel 5.1
- → Dynamic url segment name in laravel 5.1
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Laravel Send URL with JSON
- → Laravel 4.2 application occurs unnecessary redirection after uploading live server
- → Laravel 5 route::group more than one controller issue
- → Angularjs not working inside laravel form
- → Function Undefined in Axios promise
- → AJAX folder path issue