Zoho Creator - Integration with Shopify Checkout/Storefront API

What?
This is a not so quick article on how to build up a checkout cart page with Zoho Creator which directs the customer to a Shopify payment page.

Why?
I didn't find anything on the web via Google or Bing that clearly explained how to connect to Shopify API and build the checkout page without making my app into a Sales Channel.

How?
The trick is to actually ignore the Checkout API and the standard error(s) while trying to create a checkout with a storefront access token:
[API] Invalid key or access token (unrecognized login or wrong password)
or how about:
[API] This action requires merchant approval for write_checkouts scope.

Further to this, an order is created when a draft order accepts payment!


What
A quick post on how I managed to build a regex to extract all non-numeric characters (all non-digits) from a string.

Why?
I only want the digits/numbers from a string:
copyraw
v_PaymentTerms = "Credit Note - 30 Days";

// we want the 30 from the above string
  1.  v_PaymentTerms = "Credit Note - 30 Days"
  2.   
  3.  // we want the 30 from the above string 

How?
Category: Zoho :: Article: 674

What?
This is an article resolving an issue where a template will shrink all the text when in PDF preview.

Why?
Ok doesn't need a song and dance about it, but I went home yesterday downtrodden by an issue which I'd been working on for most of the day where I would remove all the styling and the text would still appear small. Sure I resized the text to about 46pt and everything was over 3000px in width but this is not good for a final solution. I thought maybe there was a setting for the default font size or where I've accidentally zoomed out in the browser... but these were red herrings as I have other templates that work fine.

How?
The error is one of those that you wouldn't consider relevant in this case, after all, all styling was removed... Here are two screenshots to demonstrate the issue:

What?
This is an article documenting how to update Creator from a workflow written in a Deluge Script held in ZohoCRM.

Why?
I've also started this article to document an issue we encountered where our code was as per the documentation provided, and the responses returned as successful, but the target fields did not update. This was as a result after changing the owner of the Creator app to another person and adding our previous Super Admin account as a "Developer".

How?
I'm going to demo two methods here using the <connection_link>

What?
This is an article documenting how to access ZohoCRM with API v2 using PHP and cURL. The first few functions are to manage OAuth v2 and generate the refresh and access tokens. The second snippet of code below is using the functions to read data from Zoho CRM and to write data back to the system.

Why?
I've rewritten this code a few times and want to store the finalized version (following updates) making it as generic as I can in order to apply it to any client.

How?
Firstly, you will need to browse to https://accounts.zoho.eu/developerconsole and register your new app (or the one you will have completed once copying the below scripts).

What?
This code snippet took me a while to do and the documentation is flaky so I thought I'd make a note here just in case I need to refer to it again.

Why?
I want to modify a picklist and fill it with options from a certain time of the day to the closing time of the day (working hours).

How?
The plan is to iterate through a 24-hour clock, enable adding to the picklist when the starting hour is found and stop adding when the closing hour is found. The picklist field is called "Time_Field".

What?
So this is NOT an article on how to create a MD5 function for an ETag in Zoho Deluge as I expected it would be. At time of print, the Zoho documentation (and Google search results) make no mention of using MD5 in an encryption task.

Why?
I'm trying to create an ETag for a synchronization process between Zoho Creator and Zoho CRM. Combining all the fields to compare into a single field can't be done via the documented methods (base64, urlencode or AES) as this exceeds 255 characters (it could be a multiline but this would defeat the objective of an Etag).

How?

What?
So another quick note as I couldn't find a solution on the forums. This is to hide the reset button on a non-stateless form (state form?). I have posted this on the Zoho forums as well but here goes:

Why?
Because I can. And because as someone said, a "reset" button is so 1990. I have a confirmation page and don't want the button to show so...

How?

What?
So I thought I'd write an article to help me resolve the particular issue where the organization details and the header of the product line items table would display on the first page, the product line items would then print on the second page, with the terms and conditions or small print notes on a third page.


How?

What?
This is a very quick note with the code to retrieve the full day name from a date (eg. "Monday").

Why?
If I use the toString() function to get the day, it only returns the first 3 letters of the day (eg. "Mon").
copyraw
My_Date = today;
Day_Name = My_Date.toString("E");  // returns "Mon"
  1.  My_Date = today
  2.  Day_Name = My_Date.toString("E");  // returns "Mon" 
How?
Category: Zoho :: Article: 653

What?
This is a very quick note with the code to determine the English ordinal of a date (eg. "st" of "1st"). So in a date, instead of "Tuesday, 6 November 2018", I could want "Tuesday 6th of November 2018".

Why?
Well there's a long a way to do it (but reliable). But being limited to the lines of code you can run (ref. "Maximum number of executable statements", anything that reduces the number of lines used would be an improvement. This is how I was doing it previously.
copyraw
// get the date (eg. 1, 2, 3, ... 29, 30, 31)
	This_Day_Date = My_Date_Field.toString("d");

	// determine English ordinal
	English_Ordinal = "th ";
	if(This_Day_Date == "1" || This_Day_Date == "21" || This_Day_Date == "31")
	{
		English_Ordinal = "st ";
	}
	if(This_Day_Date == "2" || This_Day_Date == "22")
	{
		English_Ordinal = "nd ";
	}
	if(This_Day_Date == "3" || This_Day_Date == "23")
	{
		English_Ordinal = "rd ";
	}

	// display
	info My_Date.toString("d") + English_Ordinal;
  1.  // get the date (eg. 1, 2, 3, ... 29, 30, 31) 
  2.      This_Day_Date = My_Date_Field.toString("d")
  3.   
  4.      // determine English ordinal 
  5.      English_Ordinal = "th "
  6.      if(This_Day_Date == "1" || This_Day_Date == "21" || This_Day_Date == "31") 
  7.      { 
  8.          English_Ordinal = "st "
  9.      } 
  10.      if(This_Day_Date == "2" || This_Day_Date == "22") 
  11.      { 
  12.          English_Ordinal = "nd "
  13.      } 
  14.      if(This_Day_Date == "3" || This_Day_Date == "23") 
  15.      { 
  16.          English_Ordinal = "rd "
  17.      } 
  18.   
  19.      // display 
  20.      info My_Date.toString("d") + English_Ordinal; 

How?
Category: Zoho :: Article: 655

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

display   database   note   need   used   joomla   data   first   source   version   deluge   using   form   website   following   error   table   would   user   report   list   windows   system   added   page   create   order   code   server   uploaded   client   value   name   script   zoho   creator   file   work   find   field   files   license   case   function   date   time   google   where   parameter   mysql   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.