Folder layout
.liquid, .css, .json, .js, .svg or .html.
The manifest
config/theme.json describes the theme:
Templates
Paysum picks a template from the page address:
Checkout, the order page and the status page are Paysum pages. Themes do not render them.
layout/theme.liquid wraps every template. Print the template’s output with content_for_layout:
templates/index.liquid renders the sections in the merchant’s order:
Tags
Paysum supports the standard Liquid tags (if, unless, case, for, assign, capture, comment, raw) and these:
include is not available. Use render.
Global objects
These objects are available in every file.shop
products
products is the catalog in order. Sold-out products are left out when the merchant turned on Hide sold out. On a category page, products holds that category’s products.
featured_products holds the featured products. spotlight_products holds the featured products, or the first product when none are featured, up to six. Use it for carousels.
product
settings
The merchant’s design settings:content and copy
contentholds what merchants edit in the visual builder, for examplecontent.products_title,content.features_title,content.faq_title, thecontent.featureslist and thecontent.faqslist.copyholds the text from your manifest’sdefaults, with the merchant’s edits applied, for examplecopy.purchaseLabel.
Other objects
The product page
On/products/<slug>, page also has:
Filters
All standard Liquid filters work, such asescape, default, upcase, size, first, newline_to_br and date. Paysum adds or changes these:
Output is escaped
Output is HTML-escaped by default. To print trusted HTML, such asproduct.description, add | safe. Never mark buyer or merchant text as safe unless Paysum already gives it to you as HTML.
Let merchants edit text in place
Adddata-editable to an element to make its text editable in the visual builder:
Add
data-section="<id>" to each section’s root element so the builder can select, hide and reorder it.