Add a modification to checkout process

pedrossantos
New Member
6 0 0

Hi guys!

 

Just starting out on shopify development!

Quick question: Where should i start, in terms of API's, to implement a modification into the checkout page, in order to only allow to finish the process if a valid Zipcode/postal code is entered?

 

Thank you!

 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Hey @pedrossantos,

 

This would require a checkout.liquid modification or use of Scripts (both Plus features).

 

Alternatively, you could confirm their zip on arrival, and use webhooks/API to validate orders once they're placed.

0 Likes
pedrossantos
New Member
6 0 0

Hi @SBD_, Thank you for the time to reply to my question.

 

Since this is to be used on the Basic plan, I guess there is no way to change the checkout process, nor to create a custom carrier that could achieve this, right?

 

And about the alternative solution you were recommending, you were suggesting  I checked the created Order for the User address and do the validation then? But that would be only available after a user paid the order, or did I miss a detail on your ideia?

 

Thank you again

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Hey @pedrossantos 

 

Since this is to be used on the Basic plan, I guess there is no way to change the checkout process, nor to create a custom carrier that could achieve this, right?

Carrier services is a good idea - but yes, the basic plan would prevent this.

 

And about the alternative solution you were recommending, you were suggesting  I checked the created Order for the User address and do the validation then? But that would be only available after a user paid the order, or did I miss a detail on your ideia?

You could add something to the theme to check their zip before they proceed to checkout. Then, should anyone make it through and change their zip along the way, you could cancel the orders manually or via the API.

 

0 Likes
pedrossantos
New Member
6 0 0

Hey @SBD_ 

Thanks again for your time on following this with me!

Could I apply something to the theme to check the zip on the Cart page too? Or that wouldn't be possible too?

For example could i show/hide the checkout button on cart depending on some criteria I could code on the cart page?

 

Thank you again 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Could I apply something to the theme to check the zip on the Cart page too? 

Yep for sure.

0 Likes
pedrossantos
New Member
6 0 0

Hi @SBD_ 

Thanks for the help!

 

Could you point me in the right direction on where/how can i make the necessary changes to create this? I'm reading on the documents but at first sight it seems I would have to create a all new storefront to take care of this. Couldn't I just add js scripts to the product and cart page or is that not possible?

 

Thank you again 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Couldn't I just add js scripts to the product and cart page?

That sounds like the way to go. If it's for a single store, you can modify the theme (files of interest: theme.liquid, product.liquid, cart.liquid). If it's for multiple stores, consider injecting a ScriptTag.

0 Likes