ShopWired objects
The article has been reviewed and corrected for spelling, punctuation, and grammar errors. Here is the revised version:
Visitor
Visitor
The visitor object is an extension of the global object and is available on any Twig template.
global.visitor.ip
Returns the IP address of the visitor.
global.visitor.country_code
Returns the country code of the country where the visitor originates from. The property will return the Alpha-2 Code of the .
global.visitor.country_name
Returns the name of the country where the visitor originates from. The property will return the English Short name of the .
global.visitor.is_mobile
Returns true
if the visitor is accessing the website from a mobile device (a detection library is used to detect the type of device used by a visitor).
global.is_bot_visitor
Returns true
if the visitor is a . Use of this variable to hide contents from a website page for bots such as Googlebot may break Google's guidelines.
Theme
Theme
global.theme.settings
An object of the configured values for each setting defined in the theme settings.json file.
global.theme.is_preview_mode_enabled
Will return true
if the website is being viewed through the theme customiser within a ShopWired account (live preview mode).
Header and Footer
Header and Footer
global.header
Is a required object that must be present in master.twig. It must be placed within the HTML <head>
tag and dynamically loads all the required meta tags for a page and any other scripts or tags entered into the account (such as the visitor tracking scripts).
global.footer
Is a required object that must be present in master.twig. It should be placed immediately before the closing </body>
tag of the document and loads scripts and other code entered into the account (such as the live chat script).
Business
Business
global.business.name
Returns the company name of the ShopWired account.
global.business.logo_url
Returns the URL of the logo file uploaded in the ShopWired account.
global.business.address
Returns the address of the ShopWired account.
global.business.one_line_address
Returns the address of the ShopWired account on one line. Each line of the address is separated with a comma and space.
global.business.phone
Returns the phone number of the ShopWired account.
global.business.email
Returns the email address of the ShopWired account.
global.business.fax
Returns the fax number of the ShopWired account.
global.business.url
Returns the website of the ShopWired account (as set in the account).
global.business.location
Returns the location of the ShopWired account. The property will return the Alpha-2 Code of the .
Current URL and Path
Current URL and Path
global.current_url
Returns the URL of the page being viewed.
global.current_path
Returns the path of the page being viewed.
Social Links
Social Links
global.social_links
Returns an array of social media profile URLs set in the ShopWired account on the social network URLs page in a link object.
link.name
Returns the name of the social media link, e.g. Facebook.
link.url
Returns the URL of the social media link.
link.title
Returns the title of the social media link, e.g. Facebook.
Featured Products and Featured Categories
Featured Products and Featured Categories
featured_categories
Returns an array of categories selected as featured categories.
featured_products
Returns an array of products selected as featured products. The array is filtered for trade/non-trade products depending on configured settings within the ShopWired account and the type of visitor.
random_products
Returns an array of products selected at random on page load, a maximum of 100 products are returned in the array. The array is filtered for trade/non-trade products depending on configured settings within the ShopWired account and the type of visitor.
new_products
Returns an array of new products added to the ShopWired account, a maximum of 100 products will be returned. The array is filtered for trade/non-trade products depending on configured settings within the ShopWired account and the type of visitor.
Global Features
Global Features
global.features.ajax_basket
Returns true
if the soft add to basket app is installed in the ShopWired account.
global.features.apps.blog
Returns true
if the blog app is installed in the ShopWired account.
global.features.apps.brands
Returns true
if the brands app is installed in the ShopWired account.
global.features.apps.bulk_discounts
Returns true
if the bulk discounts app is installed in the ShopWired account.
global.features.apps.currencies
Returns true
if the currencies app is installed in the ShopWired account.
global.features.apps.digital_downloads
Returns true
if the digital downloads app is installed in the ShopWired account.
global.features.apps.gift_vouchers
Returns true
if the gift vouchers app is installed in the ShopWired account.
global.features.apps.pre_order_products
Returns true
if the pre-order products app is installed in the ShopWired account.
global.features.apps.product_bundles
Returns true
if the product bundles app is installed in the ShopWired account.
global.features.apps.product_extras
Returns true
if the product extras app is installed in the ShopWired account.
global.features.apps.product_reviews
Returns true
if the product reviews app is installed in the ShopWired account.
global.features.apps.reward_points
Returns true
if the reward points app is installed in the ShopWired account.
global.features.apps.soft_add_to_cart
Returns true
if the soft add basket app is installed in the ShopWired account.
global.features.apps.stockists
Returns true
if the stockists app is installed in the ShopWired account.
global.features.apps.trade_accounts
Returns true
if the trade accounts app is installed in the ShopWired account.
global.features.apps.two_for_one
Returns true
if the multi-buy offers app is installed in the ShopWired account.
global.features.apps.videos
Returns true
if the videos app is installed in the ShopWired account.
global.features.extensions.tabbed_descriptions
Returns true
if the tabbed product descriptions app is installed in the ShopWired account.
global.features.extensions.stripe_subscriptions
Returns true
if the subscriptions app is installed in the ShopWired account.
global.features.extensions.address_book
Returns true
if the address book app is installed in the ShopWired account (all accounts have this app installed by default).
global.features.extensions.back_in_stock
Returns true
if the back in stock notifications app is installed in the ShopWired account.
global.features.extensions.min_max_quantity
Returns true
if the min/max order quantity app is installed in the ShopWired account.
global.features.extensions.send_to_a_friend
Returns true
if the send to a friend app is installed in the ShopWired account (all accounts have this app installed by default).
global.features.extensions.product_filters
Returns true
if the product filters app is installed in the ShopWired account.
global.features.extensions.postcode_shipping
Returns true
if the postcode shipping app is installed in the ShopWired account.
global.features.shipping_on_checkout
Returns true
if the ShopWired account is configured for shipping on checkout
.
Min/Max Order Quantities
Min/Max Order Quantities
global.customer.order_quantity_restrictions_enabled
Returns true
if the min/max order quantity app is installed and the current customer is subject to order quantity restrictions.
global.features.order_quantity_restrictions_for_visitors
Returns true
if the min/max order quantity app is installed and the current visitor is subject to order quantity restrictions.
Info Message
Info Message
global.info_message
Will return any message sent by the platform on submission of a form. For example, security check failed
when a contact form is submitted and reCAPTCHA was not properly completed.
Other Global Objects and Properties
Other Global Objects and Properties
global.wishlist.items
Returns the number of items in the wishlist.
global.basket.value
Returns the grand total value of the basket (including any tax and shipping costs, less any discounts).
global.basket.sub_total
Returns the sub total of all items in the basket less any discounts. This value returns with or without VAT depending on the VAT settings applicable to the visitor.
global.basket.sub_total_including_tax
Returns the sub total of all items in the basket less any discounts, with VAT.
global.basket.sub_total_excluding_tax
Returns the sub total of all items in the basket less any discounts, without VAT.
global.basket.original_sub_total
Returns the sub total of all items in the basket before any discounts. This value returns with or without VAT depending on the VAT settings applicable to the visitor.
global.basket.original_sub_total_excluding_tax
Returns the sub total of all items in the basket before any discounts, without VAT.
global.basket.original_sub_total_including_tax
Returns the sub total of all items in the basket before any discounts, with VAT.
global.basket.shipping
Returns the total cost of shipping, less any discounts. This value returns with or without VAT depending on the VAT settings applied to the visitor.
global.basket.shipping_including_tax
Returns the total cost of shipping, less any discounts, with VAT.
global.basket.shipping_excluding_tax
Returns the total cost of shipping, after any discounts. This value returns with or without VAT depending on the VAT settings applied to the visitor.
global.basket.original_shipping
Returns the total cost of shipping, before any discounts. This value returns with or without VAT depending on the VAT settings applied to the visitor.
global.basket.original_shipping_excluding_tax
Returns the total cost of shipping, less any discounts, without VAT.
global.basket.original_shipping_including_tax
Returns the total cost of shipping, less any discounts, with VAT.
global.basket.discount
Returns the total value of discounts in the visitor’s basket.
global.basket.vat
Returns the total amount of VAT applicable to products and shipping costs in the visitor’s basket.
basket_items()
Returns an array of items in the basket.
global.shipping_rate_id
Returns the ID of the shipping rate selected by the visitor (if one has been selected).
global.shipping_country_id
Returns the ID of the shipping country selected by the visitor (if one has been selected).
global.currency_id
Returns the ID of the currency selected by the visitor (defaults to the ShopWired account’s base country currency if no currency has been selected or the multi-currency app is not installed).
Global Currencies
Global Currencies
global.currencies
Returns an array of currencies configured in the ShopWired account.
currency.id
Returns the ID of the currency.
currency.name
Returns the name of the currency, the ISO 4217 currency code (e.g. GBP or USD).
currency.symbol
Returns the HTML code for the currency symbol.
When using the global.currencies array to return a list of available currencies for the visitor to select from, use the currency_url
function to return a URL which allows the visitor to select a currency, e.g. {{ currency_url(currency.id) }}
.
Global Currency Countries
Global Currency Countries
global.currency.countries
Returns an array of countries.
country.id
Returns the ID of the country.
country.name
Returns the name of the country. The property will return the English Short name of the .
country.flag_url
Returns the URL for an image file of the flag of the country, e.g. https://do19vxnnln0jc.cloudfront.net/GB.png?v=1
. The format for URLs uses the Alpha-2 Code of the .
currency_id
Returns the ID of the currency.
currency.name
Returns the name of the currency, the (e.g. GBP or USD).
currency.symbol
Returns the HTML code for the currency symbol.
currency.current
Returns true
if the currency is currently selected.
Customer
Customer
customer.id
Returns the ID for the customer.
customer.company
Returns the company name of the customer (only applicable if the customer is a trade customer or has otherwise entered a company name).
customer.first_name
Returns the first name of the customer.
customer.last_name
Returns the last name of the customer.
customer.date_of_birth
Returns the date of birth of the customer.
customer.email
Returns the email address of the customer.
customer.phone
Returns the phone number of the customer.
customer.address_line1
Returns the first line of the address of the customer.
customer.address_line2
Returns the second line of the address of the customer.
customer.address_line3
Returns the third line of the address of the customer.
customer.city
Returns the city within the address of the customer.
customer.zip
Returns the zip or postal code of the customer.
customer.state_id
Returns the ID of the state of the customer (only available if the customer is in the USA).
customer.province
Returns the county, province or state of the customer (only available if the customer is outside of the USA).
customer.accepts_marketing
Returns true
if the customer has accepted to receive marketing communications.
customer.country_id
Returns the ID of the country of the customer (which returns the English Short name of the ).
customer.country_name
Returns the name of the country of the customer.
customer.trade
Returns true
if the customer is a trade customer.
customer.reward_points
Returns an integer of the number of reward points the customer currently has within their account.
customer.is_credit
Returns true
if the customer has been marked as a credit customer.
customer.additional_data[0]
An additional data field for the trade customer.
customer.additional_data[1]
An additional data field for the trade customer.
customer.additional_data[2]
An additional data field for the trade customer.
customer.additional_data[3]
An additional data field for the trade customer.
customer.additional_data[4]
An additional data field for the trade customer.
customer.mobile_number
Returns the mobile number of the customer.
customer.website
Returns the website address entered of the customer.
customer.vat_number
Returns the VAT number entered of the customer.
customer.discount
Returns the global percentage trade discount entered for the trade customer.
customer.trade_group_name
Returns the name of the trade pricing band the trade customer belongs to.
customer.cost_price_multiplier
Returns the cost price multiplier configured for the trade customer.
customer.bulk_discounts_enabled
Returns true
if the bulk discounts app is installed and bulk discounts are enabled for the current customer.
customer.addresses
Returns an array of addresses, each address has properties of address.first_name
, address.last_name
, address.line1
, address.line2
, address.line3
, address.city
, address.province
, address.state_id
, address.postcode
, address.country_id
, address.url
(returns the URL of the page on the website the address can be viewed), address.all
returns a concatenated address.
countries
Returns an array of countries, each country has properties of country.id
and country.name
(which returns the English Short name of the ISO ).
global.customer.favourite_products
Returns an array of products previously ordered by the customer sorted with the most frequently purchased returned first.
global.customer.orders
Returns an array of orders placed by the customer.
global.customer.referred_customers
Returns an array of referred customers, each referred customer has properties of referred_customer.first_name
(which returns the first name of the referred customer), referred_customer.last_name
(which returns the last name of the referred customer) and referred_customer.reward_points_generated
(which returns the number of reward points the customer earned from referring the referred customer).
global.customer.referral_scheme_url
Returns a unique URL for the customer to refer new customers to your website.
global.customer.public_wishlist_id
Returns the ID of the public wishlist for the customer.
Category
Category
global.categories
Returns an array of categories, it excludes categories marked as inactive/archived.
category.id
Returns the unique platform ID for the category.
category.title
Returns the title/name of the category.
category.url
Returns the URL of the category.
category.photo_url
Returns the URL of the photo/image for the category.
category.photo_description
Returns the ALT text for the photo/image for the category.
category.description
Returns the description of the category.
category.description2
Returns the 2nd category description.
category.from_price
Returns the from price for the category (i.e. calculates the cheapest price for the product within the category and returns it), this will be returned with or without VAT based on the visitor’s VAT settings.
The variable only inspects categories up to 2 levels deep to calculate a from price.
category.current
Returns true
if the category being viewed is the current category (this can be used in sidebar menus to highlight the selected category).
category.open
Returns true
if the category is open in the category menu.
category.categories
Returns an array of the categories (subcategories) assigned to a category. Only the category's immediate subcategories are returned in the array.
subcategory.categories
Returns an array of the subcategories assigned to a subcategory.
category.parents
Returns an array of the categories assigned to the category as parents.
category.all_products_count
For a parent category, will return the total number of products that the ?all=1
function will return.
category.active
Returns true
if the category is active, and false
if the category is not active.
Brand
Brand
global.brands
Returns an array of brands, it excludes brands marked as inactive/archived.
brand.id
Returns the unique platform ID for the brand.
brand.title
Returns the title/name of the brand.
brand.url
Returns the URL of the brand.
brand.photo_url
Returns the URL of the photo/image for the brand.
brand.photo_description
Returns the ALT text for the photo/image for the brand.
brand.description
Returns the description of the brand.
Product
Product
product.id
Returns the ID for the product.
product.title
Returns the title/name of the product.
product.brand
Returns the brand object of the brand the product is assigned to.
product.photo_url
Returns the URL of the main (1st) photo/image for the product.
product.photo_description
Returns the ALT text for the main (1st) photo/image for the product.
product.photos
Returns an array of the product's photos/images with properties of photo.url
and photo.description
(which returns the ALT text).
product.raw_video_embed_code
Returns the video embedding code for the product.
product.video_embed_code
Returns a modified version of the video embedding code set for the product (just outputting the URL within the embed code).
product.videos
Returns an array of videos for the product (when using the multiple videos app) where video
returns the video embedding code.
product.description
Returns the description of the product.
product.description2
Returns the 2nd description of the product.
product.description3
Returns the 3rd description of the product.
product.description4
Returns the 4th description of the product.
product.description5
Returns the 5th description of the product.
product.sku
Returns the SKU code for the product, if the product has variations which have SKU codes set, the product.sku
is, in effect, defunct but can still be returned.
product.stock
Returns a non-negative integer of the current stock quantity of the product. If the product has variations which have SKU codes set, the product.stock
is, in effect, defunct but can still be returned. This variable will return 0
if the actual stock is negative.
product.raw_stock
Returns an integer of the current stock quantity of the product. If the product has variations which have SKU codes set, the product.stock
is, in effect, defunct but can still be returned.
product.in_stock
Returns true
if the product is in stock (i.e. has a product SKU code set and product.stock
is greater than 0) and returns false
if the product is out of stock (i.e. has a product SKU code set and product.stock
is 0 or less).
product.variants_out_of_stock
Returns true
if the product has variants, and a SKU code and stock quantity is set at the variant level (rather than the product level), and all of the variants are out of stock.
To return the path of the product page use the property product.slug
- this will return the path without the leading /
.
To return the full URL of the product page use the property product.url
.
product.price
Returns the price of the product, use the format_price
function to return the price of the product to 2 decimal places and include a currency symbol. product.price
returns including or excluding VAT depending on the VAT settings of the visitor.
product.sale_price
Returns the sale price of the product, use the format_price
function to return the price of the product to 2 decimal places and include a currency symbol. product.sale_price
returns including or excluding VAT depending on the VAT settings of the visitor.
product.price_including_tax
Returns the product price including VAT.
product.price_excluding_tax
Returns the product price excluding VAT.
product.sale_price_including_tax
Returns the product sale price including VAT.
product.sale_price_excluding_tax
Returns the product sale price excluding VAT.
product.rrp
Returns the RRP/compare price of the product.
product.archived
Returns true
if the product is not active (i.e. has been archived), returns false
if the product is active.
product.can_be_added
Returns true
if the product can be added to the basket. A product will only be able to be added to the basket if it is not archived and is in stock.
product.shipping_address_not_required
Returns true
if the product is marked as not requiring a delivery address.
product.new
Returns true
if the product has been marked with the new indicator.
product.two_for_one
Returns true
if the product has been marked with the two for one indicator (using the multi-buy offers app).
product.three_for_two
Returns true
if the product has been marked with the three for two indicator (using the multi-buy offers app).
product.delivery_cost
Returns the specific delivery cost set for the product.
product.free_delivery
Returns true
if the product has been marked with free delivery.
product.vat_exclusive
Returns true if the product has been marked as zero rated for VAT.
product.warehouse_notes
Returns the warehouse notes set for the product.
product.categories
Returns an array of the categories a product is assigned to. (Note this is not the full category tree but the categories a product is directly assigned to).
product.related_products
Returns an array of the related products.
product.tag
Returns the tag object if tags are enabled on the product.
product.gtin
Returns the GTIN set for the product.
product.mpn
Returns the MPN set for the product.
product.in_wishlist
Returns true
if the product is in the visitor's wishlist.
product.in_public_wishlist
Returns true
if the product is in the customer’s public wishlist.
product.trade_type
Returns a value based on what type of categories the product is assigned to. Values of retail_and_trade
, retail
and trade
are possible.
product.reward_points
Returns the number of reward points earned by purchasing the product.
product.hs_code
Returns the entered HS Tariff code of the product.
product.eligible_for_vat_relief
Returns true
if the product is eligible for VAT relief.
product.is_bundle
Returns true
if the product is a product bundle.
product.bundle_products
Returns an array of the product bundle's constituent products.
bundle_product.quantity
Returns the quantity of the constituent product in the product bundle.
Product Variations
Product Variations
product.options
Returns an array of the product variations configured.
option.name
Returns the name of the variation option (e.g. 'colour').
option.id
Returns the ID of the variation option.
option.values
Returns an array of the available values within a variation.
value.name
Returns the name of the variation value (e.g. 'blue').
value.id
Returns the ID of the variation value.
product.variations
Returns an array of the variation combinations.
variation.id
Returns the ID of the variation combination.
variation.values
Returns the values of the variation combination e.g. Small Green Metal.
variation.image_url
Returns the URL of the image assigned to the variation combination.
variation.price
Returns the price of the variation combination, will return either with VAT or without VAT depending on the visitor’s VAT settings.
variation.sale_price
If the product has a sale price, this will return the product sale price (if a % sale is set this will return the sale price of the variation combination), will return either with VAT or without VAT depending on the visitor’s VAT settings.
variation.gtin
Returns the GTIN set for the variation combination.
variation.mpn
Returns the MPN set for the variation combination.
variation.sku
Returns the SKU code of the variation combination.
variation.in_stock
Returns true
or false
depending on whether the variation combination is in or out of stock.
variation.quantity
Returns a non-negative integer representing the stock quantity of the variation combination. Negative values are returned as 0
.
variation.raw_quantity
Returns an integer representing the actual stock quantity of the variation combination, including negative values.
variation.reward_points
Returns the number of reward points earned by purchasing the variation.
variation.url
Returns the URL of the variation (visiting this URL will pre-select the variation options from the drop down).
variation.purchasable
Returns true
or false depending on whether the variation can be purchased or not.
The above can be used to create a form on the product page for each variation combination, e.g.
product.current_variation
Returns true
if a valid variation was specified in the URL and has an options property similar to product.options
.
Product Extras
Product Extras
product.extras
Returns an array of extras for a product.
extra.id
Returns the ID of the extra.
extra.name
Returns the name of the extra (e.g. 'Mobile phone charger').
extra.price
Returns the price of the extra will return with VAT or without VAT depending on the visitor’s VAT settings.
Product Bulk Prices
Product Bulk Prices
product.bulk_prices
Returns an array of the bulk pricing.
bulk_price.quantity
Returns the quantity the customer needs to purchase to qualify for the discounted price.
bulk_price.value
Returns the price of a single product when purchased at that quantity.
product.bulk_variations
Returns an array of the bulk pricing available for each variation.
variation.title
Returns the variation combination applicable to the discount. Each individual variation combination is returned separated with a comma (as in the example above).
product.bulk_discounts
Returns an array of the bulk discounts for the product.
bulk_discount.quantity
Returns the quantity the customer needs to purchase to qualify for the discounted price.
bulk_discount.percent
Returns the percent discount from the normal product price, when purchased at that quantity.
Product Review
Product Review
product.reviews
Returns an array of reviews for the product.
review.name
Returns the name of the author of the review.
review.content
Returns the content of the review.
review.rating
Returns the rating given by the author (the maximum value is 5).
review.date
Returns the date the review was created.
product.rating
Returns the average rating of the product (an integer) across all reviews.
product.rating(true)
Returns the average rating of the product (to one decimal place).
Product Questions
Product Questions
product.allow_questions
Returns true
if the product is set to allow questions.
product.questions
Returns an array of questions already asked on the product where the question is set to display publicly.
question.id
Returns the ID of the question.
question.name
Returns the name of the visitor that asked the question.
question.question
Returns the question asked by the visitor.
question.answer
Returns the answer provided.
question.positive_votes
Returns the number of positive votes the question has received.
question.negative_votes
Returns the number of negatives votes the question has received.
Product Bundles
Product Bundles
product.bundles
Returns an array of bundles that the product is contained within.
bundle.title
Returns the title of the bundle product.
bundle.photo_url
Returns the URL of the bundle product image (not the image of the bundle product itself).
bundle.price
Returns the price of the bundle, with VAT or without VAT depending on the visitor’s VAT settings.
bundle.url
Returns the full URL of the bundle product.
Pre-Order Products
Pre-Order Products
product.is_pre_order
Returns true if the product is a pre-order product.
product.is_released
Returns true if the time now is after the pre-order product's release date/time.
product.release_date
Returns the product's release date and time in UTC.
product.shipping_date
Returns the product's ships-on date in UTC.
Min/Max Order Quantities
Min/Max Order Quantities
product.minimum_order_quantity
Will return the minimum order quantity set at a per-product level, available on a basket item as product.minimum_order_quantity
.
global.minimum_product_quantity
Will return the minimum order quantity set globally for all products, available on a basket item as global.minimum_product_quantity
.
product.maximum_order_quantity
Will return the maximum order quantity set at a per-product level, available on a basket item as product.maximum_order_quantity
.
global.maximum_product_quantity
Will return the maximum order quantity set globally for all products, available on a basket item as global.maximum_product_quantity
.
Offers
Offers
product.offers
Returns an array of offers available on a product, it excludes offers marked as inactive and where the offer won't apply because of the start/end date.
items.offers
Returns an array of offers applied to a product in the basket.
offer.id
Returns the unique ID of the offer.
offer.title
Returns the title of the offer.
offer.description
Returns the description of the offer.
offer.start_date
Returns the start date of the offer. Use the date filter to return the date in the required format. You can read more about the date filter here.
offer.end_date
Returns the end date of the offer. Use the date filter to return the date in the required format. You can read more about the date filter here. An offer set to 'never expire' will return an end date of 0.
offer.discount_type
Returns the discount type, either fixed_price or percent.
offer.discount_amount
Returns the amount of the discount.
offer.item_count
Returns the product count of the offer.
Stock on Back Order
Stock on Back Order
product.purchasable_when_out_of_stock
Will return true
if the product is out of stock and can be purchased when out of stock.
product.out_of_stock_quantity_limit
Will return the quantity limit set for the product. When product.purchasable_when_out_of_stock
returns false
, this variable will return as 0
.
Basket
Basket
basket.sub_total
Returns the total of products in the basket, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
basket.sub_total_including_tax
Returns the total of products in the basket, after discounts, with VAT.
basket.sub_total_excluding_tax
Returns the total of products in the basket, after discounts, without VAT.
basket.original_sub_total
Returns the original total of all products in the basket, before discounts, with VAT or without VAT depending on the visitor’s VAT settings.
basket.original_sub_total_excluding_tax
Returns the original total of all products in the basket, before discounts, without VAT.
basket.original_sub_total_including_tax
Returns the original total of all products in the basket, before discounts, with VAT.
basket.discount
Returns the total value of any discounts applied to the basket (such as voucher codes).
basket.vat
Returns the total amount of VAT in the order.
basket.shipping
Returns the total cost of shipping, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
basket.shipping_including_tax
Returns the total cost of shipping, after discounts, with VAT.
basket.shipping_excluding_tax
Returns the total cost of shipping, after discounts, without VAT.
basket.original_shipping
Returns the total cost of shipping, before discounts, with VAT or without VAT depending on the visitor’s VAT settings.
basket.original_shipping_excluding_tax
Returns the total cost of shipping, before discounts, without VAT.
basket.original_shipping_including_tax
Returns the total cost of shipping, before discounts, with VAT.
basket.total
Returns the total amount of the order including VAT and shipping, after discounts.
basket.partial_payment_total
Returns the total of any partial payments applied to the order (i.e. gift cards and when reward points are redeemed).
basket.shipping_countries
Returns an array of the countries/states (shipping zones) configured on the ShopWired account. This array will be empty if the account is using the shipping on checkout
configuration.
country.id
Returns the ID of the country.
country.name
Returns the name of the country.
country.current
Returns true
if the country is the current country.
state.id
Returns the ID of the state where the country contains states.
state.current
Returns true
if the state is the current state.
state.name
Returns the name of the state.
basket.shipping_rates
Returns an array of shipping rates configured on the ShopWired account.
rate.id
Returns the ID of the shipping rate.
rate.name
Returns the name of the shipping rate.
rate.price
Returns the price of the shipping rate, with VAT or without VAT based on the visitor’s VAT settings.
rate.current
Returns true
if the shipping rate is the current shipping rate.
basket.reward_points_earned
Returns the total number of reward points earned with the purchase.
basket.has_redeemed_points
Returns true
if the visitor has converted reward points to a cash discount.
basket.reward_points_discount
Returns the monetary discount obtained from conversion of reward points.
basket.reward_points_converted
Returns the number of reward points converted to a cash discount.
basket.reward_points
Returns the number of reward points in the customer's account (will update to the remaining balance once reward points have been redeemed).
basket.can_redeem_points
Returns true
if the customer has sufficient reward points to be redeemed.
basket.voucher_codes
Returns an array of voucher codes used on the basket.
basket.voucher_codes.amount
Returns the amount of the voucher code used on the basket, as part of the array.
basket.voucher_codes.code
Returns the voucher code used on the basket, as part of the array.
Only a single voucher code can be used on a basket, therefore basket.voucher_codes[0].code
to return the voucher code used on the basket.
basket.offer_discount
Returns the total value of discounts from offers applied to the basket (note that this property should be used for illustrative purposes only, offers are not included in properties returning ‘original’ values).
basket.bulk_discount
Returns the total value of discounts obtained from bulk pricing and bulk discounts (note that this property should be used for illustrative purposes only, bulk pricing and bulk discounts are not included in properties returning ‘original’ values).
basket.user_files_lost
Returns true
when a product in the basket had files uploaded for them (when added to the basket) but because the session is lost, the files are no longer attached to the basket product.
basket.errors.has_both_normal_and_subscription_products
Returns true
when there is a mix of products in the basket, some of which are subscription products and some of which are one-off products.
basket.postcode
Returns any previously entered postcode when using postcode delivery.
basket.delivery_date
Returns any previously entered delivery date for the basket.
basket.payment_methods
Returns an array of payment methods available for the basket page.
payment_method.id
Returns the ID of the payment method.
payment_method.title
Returns the name of the payment method.
payment_method.field_name
Returns the field name of the payment method (to be included in the name=""
field on the submit basket form).
Basket Item
Basket Item
basket.items
Returns an array of items in the basket.
item.id
Returns the ID of the item in the customer's basket and any variation/options selected (this is not the product ID or the product’s variation combination ID).
item.product
Returns the product object.
item.quantity
Returns the quantity of the individual product added to the basket.
item.price
Returns the price the customer will pay for the item, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.price_including_tax
Returns the price the customer will pay for the item, after discounts, with VAT.
item.price_excluding_tax
Returns the price the customer will pay for the item, after discounts, without VAT.
item.original_price
Returns the original price of the item before discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.original_price_including_tax
Returns the original price of the item before discounts, with VAT.
item.original_price_excluding_tax
Returns the original price of the item before discounts, without VAT.
item.total
Returns the same value as item.quantity * item.price
.
item.original_total
Returns the same value as item.quantity * original_price
, with VAT or without VAT depending on the visitor's VAT settings.
item.original_total_including_tax
Returns the item.original_total value, with VAT.
item.original_total_excluding_tax
Returns the item.original_total value, without VAT.
item.original_total_tax
Returns the total VAT charged on the line item.
item.remove_url
Returns the URL the visitor needs to visit in order to remove the item from their basket. Visiting the URL will return the customer to the current page.
item.comments
Returns any comments attached to the item in the basket when the item was added to the basket (when the product form was submitted).
item.is_gift_voucher
Returns true
if the item in the basket is a gift voucher - can be used to hide the quantity field.
item.options
Returns an array of the variations chosen when the item was added to the basket.
name
Returns the type of the variation type (e.g. 'Size').
value
Returns the value chosen (e.g. 'Small').
variation_id
Returns the ID of the variation combination selected when the item was added to the basket.
item.choices
Returns an array of the product choices chosen when the item was added to the basket.
choice.name
Returns the name of the product choice type (e.g. 'Size').
choice.value
Returns the option chosen (e.g. 'Small').
choice.price
Returns the additional cost of the option chosen (e.g. '10.00'), after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.extras
Returns an array of the product extras chosen when the item was added to the basket.
extra.name
Returns the name of the extra chosen.
extra.price
Returns the price of the extra chosen, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.weight
Returns the weight of the item in the basket (it is not affected by quantity).
item.gift_voucher.sender
Returns the value entered as the sender of the gift voucher.
item.gift_voucher.recipient
Returns the value entered as the recipient of the gift voucher.
item.gift_voucher.message
Returns the value entered as the gift voucher message.
item.variation
Returns an object with variables containing details about the basket item variation selected.
item.variation.id
Returns the ID of the variation combination.
item.variation.values
Returns the values of the variation combination e.g. Small Green Metal.
item.variation.image_url
Returns the URL of the image assigned to the variation combination.
item.variation.sale_price
Will return the sale price of the variation combination, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.variation.price
Returns the price of the variation combination, after discounts, with VAT or without VAT depending on the visitor’s VAT settings.
item.variation.gtin
Returns the GTIN set for the variation combination.
item.variation.mpn
Returns the MPN set for the variation combination.
item.variation.sku
Returns the SKU code of the variation combination.
item.variation.in_stock
Returns true or false depending on whether the variation combination is in or out of stock.
item.variation.quantity
Returns the stock quantity of the variation combination.
Order
Order
order.id
Returns the ID of the order.
order.reference
Returns the reference of the order.
order.url
Returns the URL where the order can be viewed in the customer account area on the account order template.
order.date
Returns the date of the order.
order.payment_method
Returns the payment method used to place the order.
order.transaction_id
Returns the transaction ID for the order (if available).
order.payment_processor_data.card.last_four_digits
Returns the last four digits of the card that was used to make payment for the order (if available).
order.total
Returns the grand total value of the order.
order.status
Returns the current status of the order.
order.tracking_url
Returns the tracking URL of the order.
order.comments
Returns the comments associated with the order (as entered when the order was created).
order.delivery_date
Returns the delivery date (if available). This value is stored as a text string and the date filter cannot be used.
order.pdf_url
Returns the URL for the invoice PDF for the order.
If you have created multiple PDFs to use, the live theme will be returned using the variable above. If you want to include the URL for one of your other PDFs, use the variable order.pdf_url(ID)
, where ID
is replaced with the unique ID of the PDF template, which can be found beside the name of the PDF on the PDF invoices
page.
order.products
Returns an array of the products contained in the order.
Use order.products('...')
to adjust the sort order of products returns in the array replacing ...
with one of the following values: sku, sku_asc, sku_desc, name, name_asc, name_desc, quantity, quantity_asc, quantity_desc, price, price_asc, price_desc.
order.customer.id
Returns the ID of the customer that placed the order.
order.marketing
Returns true
if the order if the customer granted marketing consent when creating the order. This value is stored on the order and will not change if the customer changes their marketing preference on their customer account.
order.customer.is_trade
Returns true
if the order was placed by a registered trade customer (as the customer record is now).
order.customer.is_credit
Only applicable to trade customers, returns true
if the customer has been marked as a credit customer (as the customer record is now).
order.billing_name
Returns the billing name of the order.
order.billing_company
Returns the billing company name of the order.
order.billing_phone
Returns the billing phone number of the order.
order.billing_email
Returns the billing email address of the order.
order.billing_address
Returns the billing address of the order.
Individual address lines can be returned using the variables below.
order.billing_address1
order.billing_address2
order.billing_address3
order.billing_city
order.billing_province
order.billing_country
order.billing_postcode
order.billing_province
order.billing_state
order.billing_country
order.shipping_name
Returns the shipping name of the order.
order.shipping_company
Returns the shipping company name of the order.
order.shipping_phone
Returns the shipping phone number of the order.
order.shipping_email
Returns the shipping email address of the order.
order.shipping_address
Returns the shipping address of the order.
Individual address lines can be returned using the variables below.
order.shipping_address1
order.shipping_address2
order.shipping_address3
order.shipping_city
order.shipping_province
order.shipping_state
order.shipping_country
order.shipping_postcode
order.reward_points.earned
Returns the number of reward points earned with the order.
order.sub_total
Returns the sub total of the order, after discounts. The value will be returned excluding any tax/VAT.
order.original_sub_total
Returns the original sub total (i.e. before any discounts are applied) of the order. The value will be returned excluding any tax/VAT.
order.sub_total_including_vat
Returns the sub total of the order, after discounts. The value will be returned including any tax/VAT.
order.original_sub_total_including_vat
Returns the original sub total (i.e. before any discounts are applied) of the order. The value will be returned including any tax/VAT.
order.shipping_total
Returns the grand total of shipping charges, after discounts. The value will be returned excluding any tax/VAT.
order.original_shipping_total
Returns the original grand total of shipping charges, before discounts. The value will be returned excluding any tax/VAT.
order.shipping_total_including_vat
Returns the grand total of shipping charges, after discounts. The value will be returned including any tax/VAT.
order.original_shipping_total_including_vat
Returns the original grand total of shipping charges, before discounts. The value will be returned including any tax/VAT.
order.shipping_rates
Returns an array of shipping rates for the order.
rate.name
Returns the name of the shipping rate.
rate.price
Returns the price of the shipping rate, after discounts excluding any tax/VAT.
order.discount_total
Returns the total discounts earned on the order.
order.payment_gateway_fee
Returns any transaction fee paid by the customer (not a merchant processing fee).
order.discounts
Returns an array of discounts received on the order.
discount.name
Returns the name of the discount.
discount.price
Returns the value of the discount.
order.refunds
Returns an array of refunds added to an order.
refund.name
Returns the comment added for the refund.
refund.value
Returns the value of the refund - refunds are always added as GROSS figures.
order.vat
Returns the total VAT amount on the order.
order.sales_tax
Returns the total sales tax amount on the order.
order.partial_payment_total
Returns the total deducted from the order as a result of the use of a gift voucher.
order.total
Returns the grand total of the order.
order.reward_points.converted
Returns the total number of points converted on the order.
order.reward_points.discount
Returns the total value of the discount applied to the order as a result of the use of reward points.
order.partial_payments
Returns an array of partial payments (gift vouchers) applied to the order.
partial_payment.source_type
Returns the type of partial payment.
partial_payment.data
Returns data associated with the partial payment (e.g. the gift code used).
partial_payment.amount
Returns the amount of the partial payment.
order.digital_files
Returns an array, if the order contains digital downloads, of the digital files in an order.
digital_file.title
Returns the name of the digital file.
digital_file.product_id
Returns the ID of the product to which the download relates.
digital_file.created_at
Returns the date the download link was first available (i.e. the order date).
digital_file.expired_at
Returns the date the download link will expire.
digital_file.download_limit
Returns the maximum number of times the file can be downloaded.
digital_file.downloads
Returns the number of times the file has already been downloaded.
digital_file.url
Returns the URL where the file can be downloaded.
order.admin_comments
Returns an array of admin comments on the order.
admin_comment.created
Returns the date that the order comment was created.
admin_comment.content
Returns the contents of the comment.
Order Product
Order Product
order.products
Is an array of products contained in the order.
product.name
Returns the name of the product.
product.price
Returns the price of the product, after discounts, without tax/VAT.
product.original_price
Returns the original price of the product, before discounts, without tax/VAT.
product.price_including_vat
Returns the price of the product, after discounts, with tax/VAT.
product.original_price_including_vat
Returns the original price of the product, after discounts, without tax/VAT.
product.quantity
Returns the quantity of the individual product.
product.url
Returns the URL of the product page.
product.total
Returns the same value as product.price * product.quantity
.
product.comments
Returns any comments attached to the product when it was added to the order.
product.sku
Returns the SKU code for the product, or if the ordered product is a variation combination and the variation combination has a SKU code, the variation combination’s SKU code.
product.weight
Returns the weight of the product.
product.hs_code
Returns the entered HS Tariff code of the product.
product.photo_url
Returns the main photo for the product in the order.
order.order_product.brand.title
Returns the name of the brand the product belongs to.
product.options
Returns an array of the options selected for the product in the order.
option.name
Returns the variation type (e.g. 'Size').
option.value
Returns the variation value (e.g. 'Small').
product.extras
Returns an array of the product.
extra.name
Returns the name of the extra chosen.
extra.value
Returns the price of the extra chosen, after discounts, without VAT.
product.alt_options
Returns an array of the product choices selected for the product in the order.
alt_option.name
Returns the name of the choice type (e.g. 'Size').
alt_option.value
Returns the choice value (e.g. 'Small').
product.gtin
Returns the GTIN for the product or product variation (if one is set). Importantly, this is the GTIN for the product/variation as it is now, not at the time the order was placed.
product.mpn
Returns the MPN for the product or product variation (if one is set). Importantly, this is the MPN for the product/variation as it is now, not at the time the order was placed.
product.gift_voucher.sender
Returns the value entered as the sender of the gift voucher.
product.gift_voucher.recipient
Returns the value entered as the recipient of the gift voucher.
product.gift_voucher.message
Returns the value entered as the gift voucher message.
Subscriptions
Subscriptions
product.subscription
Returns true
if the product is a subscription product.
product.subscription_interval
Returns the billing set for the subscription product.
product.one_off_purchasing
Returns true
if the subscription product is available as a one-off purchase.
product.subscription_intervals
Returns an array of subscription intervals set for the subscription product.
subscription_interval.id
Returns the ID of the subscription interval.
subscription_interval.description
Returns the name of the subscription interval.
subscription_interval.billing_intervals
Returns the number of billing intervals for the subscription product.
subscription_interval.discount
Returns the percentage discount set for the interval for the subscription product.
basket.item.subscription_interval.id
Returns the ID of the subscription interval for a product in the basket.
basket.item.subscription_interval.description
Returns the name of the subscription interval for a product in the basket.
basket.item.subscription_interval.billing_intervals
Returns the number of billing intervals for a product in the basket.
basket.item.subscription_interval.is_one_off_purchase
Returns true
if the product in the basket is a one-off purchase.
basket.subscription_discount
Returns the total value of discounts obtained from subscription products in the basket, with VAT or without VAT depending on the visitor’s VAT settings.
basket.subscription_discount_excluding_tax
Returns the total value of discounts obtained from subscription products in the basket, without VAT.
basket.subscription_discount_including_tax
Returns the total value of discounts obtained from subscription products in the basket, with VAT.
order.product.subscription_interval.id
Returns the ID of the subscription interval on an ordered product.
order.product.subscription_interval.description
Returns the name of the subscription interval on an ordered product.
order.product.subscription_interval.billing_intervals
Returns the number of billing intervals on an ordered product.
order.product.subscription_interval.is_one_off_purchase
Returns true
if the ordered product is a one-off purchase.
order.subscription_discount
Returns the total value of discounts obtained from subscription products in the order, without VAT.
order.subscription_discount_including_tax
Returns the total value of discounts obtained from subscription products in the order, with VAT.
has_subscription_products
Returns true
(on checkout/login when not using platform checkout) if the basket contains a subscription product.
subscriptions
Returns an array of subscriptions for a customer.
subscription.created
Returns the date the subscription was created.
subscription.total_amount
Returns the total amount of the subscription.
subscription.id
Returns the ID for the subscription.
subscription.status
Returns the status of the subscription (active
or cancelled
).
subscription.order.products
Returns an array of products contained within the subscription.
Checkout
Checkout
checkout.comments
Only available if not using platform checkout, this value returns any comments entered into the comments field (if the checkout form is submitted but fails validation in some way).
Quotes
Quotes
customer.quotes
Returns an array of sent quotes as normal order objects.
order.is_quote
Returns true
if the order is a quote.
order.pay_quote_url
Returns the URL at which the customer can pay the quote.
Website / Auto Page
Website / Auto Page
page.id
Returns the page ID.
page.title
Returns the title/name of the page.
page.content
Returns the page content.
page.slug
Returns the slug of the page (i.e. the page's path without the leading /
).
page.url
Returns the full URL of the page.
Blog
Blog
posts
Returns an array of blog posts.
categories
Returns an array of categories of blog posts.
categories.name
Returns the name of the blog category.
categories.url
Returns the full URL of the blog category.
archive
Returns an array of archives of blog posts (month/years in which blog posts exist).
archive.name
Returns the name of the archive (e.g. June 2024).
archive.url
Returns the full URL of the archive.
blog.id
Returns the ID of the blog post.
post.title
Returns the title/name of the blog post.
post.url
Returns the full URL of the blog post.
post.date
Returns the date of the blog post.
post.excerpt
Returns the blog post excerpt (whether it is set automatically or manually).
post.content
Returns the content of the blog post.
post.thumbnail.image_url
Returns the URL of the thumbnail image for the blog post.
post.author
Returns the author of the blog post.
post.category
Returns the category object of the blog post.
Gallery, Photo and Video
Gallery, Photo and Video
galleries
Returns an array of galleries (this will only return galleries assigned to the theme).
gallery.url
Returns the full URL of the gallery.
gallery.name
Returns the title/name of the gallery.
gallery.photo_url
Returns the first image of the gallery.
gallery.photos
Returns an array of images within the gallery.
photo.name
Returns the name of the gallery image.
photo.url
Returns the URL of the gallery image file.
photo.target_url
Returns the full URL of the gallery photo.
videos
Returns an array of videos.
video.title
Returns the title of the video.
video.embed_code
Returns the embedding code of the video.
Breadcrumbs
Breadcrumbs
breadcrumbs
Returns an array of breadcrumbs.
breadcrumb.name
Returns the text of the breadcrumb.
breadcrumb.url
Returns the full URL of the breadcrumb.
Gift Voucher Styles
Gift Voucher Styles
styles
Returns an array of gift voucher styles.
style.id
Returns the ID of the voucher style.
style.name
Returns the name of the voucher style.
style.price
Returns the price of the voucher style, with or without VAT depending on the visitor’s VAT settings.
Stockists
Stockists
stockists
Returns an array stockists.
stockist.name
Returns the name of the stockist.
stockist.address
Returns the address of the stockist.
stockist.country
Returns the name of the country the stockist is assigned to.
stockist.map_url
Returns the map text field.
stockist.phone
Returns the phone number for the stockist.
stockist.website
Returns the website address for the stockist.
Filter Groups
Filter Groups
filter_groups
Returns an array of filter groups.
filter_group.name
Returns the name of the filter group.
filter_group.filters
Returns an array of filters.
filter.product_count
Returns the number of products that have the filter applied.
filter_group.type
Returns 1
if the filter is a price filter and 0
if it is not a price filter.
filter.active
Returns true if the filter is currently selected.
filter.id
Returns the unique platform ID of the filter.
filter.name
Returns the name of the filter.
product.filter_values
Available on the product object, returns an array of filters and options applied to a product through
{% for option, values in product.filter_values %}
where option
returns the name of the filter group and value
returns the name of the filter.
Tags
Tags
tags
Returns an array of tags.
tag.id
Returns the unique platform ID of the tag.
tag.title
Returns the title/name of the tag.
tag.url
Returns the full URL of the tag.
tag.photo_url
Returns the URL of the photo/image for the tag.
tag.description
Returns the description of the tag.