OxifyOxify
CustomizationCustom templates

Troubleshooting custom templates

Fix editors that do not show, code that will not compile, and templates that do not appear or show nothing.

The Custom template card is missing

  • Cart Editor sections: tick Enable custom template editors under Oxify Settings, in Custom templates, and click Save. See Custom templates.
  • Rewards, Added Free Gifts tab: it only appears when Position of Free Gift Items is Top of Cart or Bottom of Cart.
  • Product Page Upsell and Product List Widgets editors do not depend on that setting. They are at the end of the Design tab.

Compile error

The message reads Compile error: and the reason. Common causes, from how Oxify compiles your code:

  • More than one top-level element. Wrap them in <>...</>.
  • import, export, function declarations or several statements. Write one expression.
  • A stray ; or ) that closes the expression early.

Use Format to find syntax errors. A Format error: means the code cannot be parsed.

My edit has no effect

  1. Click Compile after editing. Typing alone does not update the compiled code.
  2. Check the switch shows Active (and the tab has the green dot).
  3. Save the cart (or the offer or widget).
  4. The reset icon only puts the starter code back; click Compile afterwards.

A section is blank

If an Active template throws while rendering (for example reading .map of something that is not a list), the section shows nothing instead of the built-in layout. Turn the switch off to bring the built-in layout back, then fix the code. Use the props reference to check names and types. Some templates also show nothing on purpose when there is no data (Upsells and Upsells with Discount without products, Add Ons without items).

It works in the preview but not on the storefront

  • The storefront only receives Active, compiled templates.
  • Product Page Upsell offers must be Active.
  • Some data differs in the preview. For example Add Ons Loading skeleton never shows in the preview, and productUrl is a placeholder there.

Saving fails

The toast reads Could not save the cart. Please try again. with a reason in brackets when the server gives one. In Product List Widgets, an Approaching the size limit banner warns when the widgets' templates data is close to its limit; switch off unused custom templates.

Support

Oxify's support team cannot help with custom template development or debugging.

On this page