OxifyOxify
CustomizationCustom templates

Props: header, footer, announcements, cart items and rewards

Every prop your template receives for the Design, Announcements, Cart Items and Rewards editors.

Read these as props.name inside your template. Names ending in StyleVars are style objects you pass to style={...}. Props starting with builtIn are ready-made nodes of Oxify's own layout, so you can keep part of the built-in UI. Colors given as hex have no #. Money values named ...Html or formatted strings are already formatted with your store's currency format.

Several tabs share props. isPreview is true inside the Cart Editor preview.

Design

isPreview (boolean), shopLocale (string), cartItemCount (number, items in the cart not counting add-on lines), titleType ("text" or "brand-logo"), brandLogoUrl (string), brandLogoSize (number or string, default 32), titleContent (node, the title with the quantity filled in), titleBackgroundColor, titleTextColor (hex), titleFontSize (string), actualTextAlign ("left", "center" or "right"), closeIconPosition ("left" or "right"), shareEnabled (boolean), onCartClose (function), onShareCart (function), builtInButtonsGroup (node, share and close buttons), builtInHeader (node).

Keep onCartClose wired to a button, or shoppers cannot close the cart from the header.

isPreview, shopLocale, moneyFormat (string), footerBackgroundColor (hex), containerStyleVars, finalTotalPrice, displayOriginalPrice, displaySavings (strings such as "12.34"), displayHasSavings (boolean), isTermsAndConditionBoxChecked (boolean), setIsTermsAndConditionBoxChecked (function), showTermsAndConditionError (boolean), setShowTermsAndConditionError (function).

Nodes you can place in any order: builtInHtmlAboveAddOns, builtInAddOns, builtInAdditionalNotes, builtInDiscountDisplay, builtInDiscountInput, builtInSplitPayments, builtInTerms, builtInSubtotal, builtInHtmlAboveCheckout, builtInCheckoutButton, builtInAcceleratedCheckout, builtInHtmlBelowCheckout, builtInGoodApi, builtInContinueShopping, builtInTrustBadges, and builtInFooter (the whole built-in footer). A node is empty when its module is off. The sticky coupon banner above the footer stays outside your template.

Announcements

Both tabs receive the same props.

PropTypeMeaning
announcementTemplatestringThe announcement text in the shopper's language, may contain {{TIMER}}.
timerstringStart of the countdown, like "05:00".
shouldUseTimerbooleanThe text contains {{TIMER}}.
isTimerExpiredAndShouldHidebooleanThe timer ended and the bar is set to hide.
typestring"DEFAULT", "CAROUSEL" or "MOVING_LINE".
slidesstring[]Texts of the carousel announcements.
marqueeSpeed, marqueeTextGapnumberMoving-line settings.
stylesobjectThe module's saved styles.
shopLocale, isPreviewstring, boolean
containerStyleVarsobjectStyle for the bar container.
hideClassNamestring"ia-hide-component" or an empty string.
defaultContentnode or nullThe text with a live countdown. Null unless type is DEFAULT.
builtInAnnouncementnodeThe whole built-in content. Use it for carousel and moving line.
skeletonHeightstringHeight for a placeholder.

The Skeleton tab shows while the cart is still loading.

Cart Items

Skeleton

Only isPreview.

Product tile

PropTypeMeaning
titlestringProduct title.
rawItemobjectThe Shopify cart line.
imageUrl, productUrlstringImage and product link.
quantitynumber
showQuantitySelectorbooleanFalse for free gift lines.
discountCodesstring[]Titles of discounts on this line.
price, compareAtPrice, savingsstring or nullFormatted. compareAtPrice and savings are null when there is none.
formattedPrice, formattedCompareAtPrice, savingsLabelstring or nullSame values as above.
unitPriceTextstring or null
styles, savingsStyleobjectCart Items styles, and the savings text style from Design.
variant, propertiesnodeThe variant and properties parts (your Variant and Properties templates when active).
bundlenullAlways null.
subscriptionobjectSee below.
onIncrease, onDecrease, onDeleteProductfunction
onQuantityChange(value), handleInputChange(event)functionSet a typed quantity.
replaceItemWithVariant(variantId)function
variantSwitcherobjectSee below.
showVariantSelectorboolean
isLoading, isDeleteLoading, isVariantLoading, cartItemLoadingbooleanLoading states.
setCartItemLoading(value)function
loadingOperationstring or undefined"increase", "decrease", "inputChange" or "remove".
setLoadingOperation(value)function
shopLocale, isPreviewstring, boolean
conversionFactornumber or null
builtInProductTile, builtInVariant, builtInVariantText, builtInProperties, builtInPrice, builtInSubscriptionnodeBuilt-in parts. builtInSubscription is null when not shown.
volumeobjectSee Volume tiers.
builtInVolumeDiscountnode or null

There is no item prop on this tab; use rawItem.

Variant

item, rawItem (the cart line), styles, variantSwitcher, showVariantSelector, isLoading, isDeleteLoading, isVariantLoading, cartItemLoading, setCartItemLoading, loadingOperation, setLoadingOperation, builtInVariant, builtInVariantSwitcher, builtInVariantText.

variantSwitcher has: isActive, isSingleVariant, fetchingOptions (booleans), selectedVariantId, selectedVariantLabel (strings), variantOptions (array of id, label, available), onVariantChange(variantId) and styles.

Properties

productProperties (array of key, value, isUrl; keys that start with an underscore are left out), subscriptionLabel (string or undefined), styles, builtInProperties.

Price

price, compareAtPrice, savings, formattedPrice, formattedCompareAtPrice, savingsLabel, unitPriceText, styles, savingsStyle, rawItem, discountCodes (string[]), isPreview, builtInPrice.

Volume tiers

isPreview, builtInVolumeDiscount and volume with: isActive (boolean), tiers (only tiers above the current quantity; each has id, minQuantity, discountType, discountValue, optional title and titleHtml), currentQuantity, displayType ("BUTTONS" or "BARS"), styles, onTierClick(minQuantity, tierId).

Subscription (props.subscription)

isActive, loading (booleans), subscriptionUpgradeData (buttonText, defaultSellingPlanId, or null), sellingPlansData (activeSellingPlanId, oneTimePurchaseText, sellingPlanGroups with id, name, selling_plans; or null), upgradeSellingPlan(rawItem, planId), changeSellingPlan(rawItem, planId), getSellingPlanGroupText(groupName, planName), styles.

Rewards

Full and Skeleton

Both tabs receive the same props.

PropTypeMeaning
rewardsModule, stylesobjectSaved Rewards settings and styles.
cartTotalnumberIn cents. Counts regular lines only (not free gifts, and add-ons only if included in rewards).
cartItemCountnumberQuantity of those same lines.
conversionRatenumber
moneyFormat, currencystringcurrency is the active store currency, default "USD".
incredibleCartMarketGId, shopLocalestring
isPreviewboolean
barFillPercentagenumber0 to 100.
rewardsMessageHtmlstringThe message above the bar (HTML).
milestonesarraySee below.
milestonesCompletednumber
formatMoney(cents)function
refreshCartfunctionReloads the cart.
builtInRewardsnodeThe built-in bar.
style5GridTemplateColumnsstringFor Style 5.
style5AllAchievedbooleanFor Style 5.

Each milestones entry has id, isAchieved, leftPosition (string), spacerLeftPosition (string), icon (node), descriptionHtml, rawLeftPositionPercent, previousLeftPositionPercent (numbers), afterAchievingHtml (empty string if not set), style5SegmentFillPercent (number), style5IsActiveSegment, style5IsNextTarget (booleans), style5PriceLabel (string) and reward (the reward's saved settings).

Rewards to be achieved

rewardsModule, styles, freeGiftStyles, cartTotal (cents, whole cart), cartItemCount (whole cart), conversionRate, moneyFormat, incredibleCartMarketGId, shopLocale, isPreview, listOfRewardsToBeAchieved, rewardsToBeAchieved (array of id, imageUrl, titleHtml, descriptionHtml, reward), cardStyleVars, imageStyleVars, titleStyleVars, descriptionStyleVars, carouselItemWidth ("85%", or "100%" with one reward), showArrows (boolean, more than one reward), arrowColor (always "#000"), onCarouselPrevious(), onCarouselNext(), formatMoney(cents), refreshCart, handleRewards(cartData), builtInRewardsToBeAchieved. There is no currency prop here.

Pick Free Gift

rewardsModule, styles, upsellStyles, freeGiftStyles, moneyFormat, shopLocale, isPreview, selectedCount, maxFreeGiftUserCanChoose (numbers), achievedTier (object with rewardSettings, availableProducts, maxSelectable, selectedCount, isFullySelected), isCustomerExcluded (boolean), headerTitleHtml, headerStyleVars, arrowColor, leftArrow, rightArrow (nodes), itemStyleVars, freeText, buttonText, showProgress (boolean, true when shoppers can pick more than one), progressText (like "1 of 2 gifts selected"), progressColor, gifts (array of id, product, title (HTML), imageUrl, originalPriceHtml, freeText, buttonText, isLoading, onSelect()), onSelectGift(product), onSliderPrevious(), onSliderNext(), builtInFreeGiftSelection.

Use onSelect or onSelectGift to add a gift: they keep the multi-variant picker working. In the preview they do nothing. Oxify's variant sheet for gifts is not part of the template.

Added Free Gifts

position ("above" or "below"), giftCount (number), giftLines (array of key and node, a ready cart line), builtInAddedFreeGifts, isPreview, shopLocale. It only renders when at least one gift line is in the cart; Oxify adds no wrapper, title or border of its own.

On this page