ShopBase Developers
  • Getting started
  • Build An App
    • Making your first request
      • Authentication
        • Public apps
        • Private apps
        • OAuth
        • API access scopes
      • Rest API References
        • Rate limits
      • Using webhooks
        • Webhook events and topics
      • Response status codes
    • How to submit an app to ShopBase App Store
    • Getting your app approved
      • App requirements
      • Testing your app
      • Submitting your app
      • The review process
  • BUILD A THEME
    • Getting started building themes
    • Theme development resources
      • Connect to your store & start developing
      • Theme structure
      • Theme object, methods, and props
      • Theme editor
        • How to update configure for theme editor
    • How to submit a theme to ShopBase Theme Store
    • Storefront SDK
  • Test and Debug app
    • Debug apps with Postman
  • Tutorial
    • Manage orders and shipping
      • Manage orders with the REST Admin API
        • Transaction
        • Order
      • Edit an existing order with the Admin API
      • Manage fulfillments with Fulfillment and FulfillmentService resources
      • Get a country field using Admin API
  • Integrate a payment gateway
    • How to create your payment gateway on ShopBase
    • Technical Specifications
Powered by GitBook
On this page

Was this helpful?

  1. BUILD A THEME
  2. Theme development resources

Theme object, methods, and props

Object

$shop
    $shop.name
        Returns the shop's name.
    $shop.email
		Returns the shop's email.
	$shop.enabled_currencies
		Returns the list of currency objects that the store accepts.

Methods

Routes
	$routeToPath(path)
	$routeToHome()
	$routeToCollections()
	$routeToCollection(collection)
	$routeToProductWithAttribute(name, type)
	$routeToProduct(product)
	$routeToProductWithCollection(collection, product)
	$routeToCart()
	$routeToMyAccount()
	$routeTopage()

Navigate
	$navigateToAccount()
	$navigateToCheckout()

Theme editor
	$getPageSettings(page)
	$getThemeSettings()
	$getForceSettings()
	$getFixedSettings(section)

Menu
	$getMenu(handle)

Device
	$getDevice()
	$isMobile()
	$isTablet()
	$isDesktop()

Storage
	$getStorage(key)
	$setStorage(key, value)

Other
	$resizeImage(url = '', height = '', width = '', crop = '', scale = '')
	$changeCurrency(code)
	$toggleOverlay(state)

Page component props

Home

Prop

Type

Description

featuredProducts

Array

featuredCollections

Array

collectionList

Array

Product

Prop

Type

Description

product

Object

variant

Object

description

String

availableOptions

Array

currentOption

Object

unavailableVariant

Boolean

unavailableOptionItems

Object

pages

Array

cartFormId

String

isPageFetching

Boolean

isDisabledAddCart

Boolean

isActiveOptionItem

Function

isCartItemAdded

Boolean

uploadProcess

Object

uploadAccept

String

validateProperties

Object

onChangeOption

Function

onChangeQuantity

Function

onChangeCustomOption

Function

onAddToCart

Function

PreviousTheme structureNextTheme editor

Last updated 5 years ago

Was this helpful?