Why Can't I view my function Error Logs?

Solved

Why Can't I view my function Error Logs?

fwallace
Shopify Partner
40 0 4

Instructions provided in documentation for viewing error logs do not work. I need to view the structure of my cart input line to do some operations on it (basically the 2 for $25, 3 for $39 type of discounts available in the Script Editor). I have core functionality in my cart transformer app working but cannot throw an error and inspect the log. 

 

Here is an example of the function installed on one of our development stores (has products imported from our production store):

 

non-viewable_log_files.png

 

Nothing is clickable to view. Why? How can this be fixed? It is critical for my development to see what objects state/values are in the run function.

Accepted Solution (1)

Nick_Wesselman
Shopify Staff
170 43 69

This is an accepted solution.

Hi @fwallace --

 

Recently cart transform functions were surfaced in admin under Settings > Checkout > Checkout rules. It should now be possible to share any function errors for cart transform from here. Note that errors clear when a new function version is deployed.

 

-Nick

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 3 (3)

Nick_Wesselman
Shopify Staff
170 43 69

This is an accepted solution.

Hi @fwallace --

 

Recently cart transform functions were surfaced in admin under Settings > Checkout > Checkout rules. It should now be possible to share any function errors for cart transform from here. Note that errors clear when a new function version is deployed.

 

-Nick

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

fwallace
Shopify Partner
40 0 4

Thanks Nick!

 

Follow up question, I am trying to duplicate the functionality of say, the Shopify Scripts split example:

 

https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#ex-split

 

And this template: https://github.com/Shopify/shopify-scripts/blob/master/Line-Item/Buy%20One%20Get%20One%20Free/script...

 

Which I have extended to function for "2 for $25" or "3 for $39" based on a products tag and total quantities, i.e. if there are two line items with qualifying tags in the cart and their quantities are 5, and the sale is "2 for $25" I would split the cart off one item and discount down to 12.25 the remainder of the items. [Can't use Discount functions as the sale items can have different prices but have to go to 12.25 or 13 each based on sale]

 

Is this functionality possible? I see examples of cart line item merging for bundles and adding on a warranty, but not splitting or decrementing the quantity of a cart line item. 

 

My goal is to get rid of the Shopify Script editor as quickly as possible while retaining the cool sale features it offers and 2 for $25 is a big revenue generator for us.

 

Please let me know.

 

Thanks.

Nick_Wesselman
Shopify Staff
170 43 69

Can you start a new topic for this please? 🙏🏼

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog