WooCommerce Dynamic Content

In this article we're going to explain how to use WooCommerce Dynamic Content.

  1. Page Title
  2. Shop URL
  3. Cart URL
  4. Checkout URL
  5. Account URL
  6. Terms URL
  7. Fallback Image
  8. Cart Items Count (Raw)
  9. Cart Items Count (Realtime)
  10. Cart Subtotal (Raw)
  11. Cart Subtotal (Realtime)
  12. Currency Symbol
  13. Product Price
  14. Product Regular Price
  15. Product Sale Price
  16. Product Sale Percentage Off
  17. Product ID
  18. Product SKU
  19. Product Title
  20. Product Url
  21. Product Short Description
  22. Product Image
  23. Product Image Url
  24. Product Stock
  25. Variable Product Stock
  26. Product Rating Count
  27. Product Average Rating
  28. Product Review Count
  29. Product Description
  30. Product Additional Information
  31. Product Reviews
  32. Product Weight
  33. Product Length
  34. Product Width
  35. Product Height
  36. Product Dimensions
  37. Product Shipping Class
  38. Product Shipping Class Slug
  39. Product Type
  40. Product Attribute

WooCommerce is one of the most fundamental plugins in WordPress, and the Cornerstone Builder offers a number of ways to interact with products, cart, and global shop settings. A number of WooCommerce Dynamic Content data points has an option to select a specific product or the current product being looped over or on the product page.

Let's unpack just a few of the reasons working with WooCommerce and Cornerstone is the perfect marriage for highly scalable and highly dynamic custom websites.

WooCommerce Product Dynamic Content

Page Title

Uses woocommerce_page_title to grab the proper page title.

Shop URL

The full URL of your shop page.

Cart URL

The full URL of a user cart page.

Checkout URL

The full URL of a the checkout page.

Account URL

The full URL of the users account page. Defaults to /account.

Terms URL

The shop terms and policy page.

Fallback Image

The default WooCommerce fallback image when a product image has not been set.

Cart Items Count (Raw)

The number of items in a user cart. This number does not dynamically change as a user adds items into their cart. It can be used with Conditions.

Cart Items Count (Realtime)

The number of items in a user cart. This number changes dynamically depending on what a user adds or removes from their cart. This actually outputs HTML that allows the tracking of this number, and as a result, it cannot be used with Conditions.

Cart Subtotal (Raw)

The total price of items and quantity totaled up in a cart. Also see Cart Items Count (Raw).

Cart Subtotal (Realtime)

The total price of items and quantity totaled up in a cart. Also see Cart Items Count (Realtime).

Currency Symbol

The currency symbol set up as the default, or that the user set up, or controlled by a plugin like WPML.

Product Price

The static number price of a particular product. See Product Price HTML.

Product Regular Price

Product price without the sale deduction.

Product Sale Price

Product sale price. If there is no sale, it will simply be the regular price.

Product Sale Percentage Off

Calculated value out of 100, which is the percentage of the regular with the sale price deducted.

Product ID

Product or Post ID. Uses internally WooCommerce get_id().

Product SKU

Product SKU. Uses interally WooCommerce get_sku().

Product Title

Product or Post Title. Uses interally WooCommerce get_title().

Product Url

Product permalink or Url. Uses interally WooCommerce get_permalink().

Product Short Description

Product short description setup from the WordPress dashboard. Uses interally WooCommerce get_short_description().

Product Image

Product image ID. size can act as an additional argument. Will default to woocommerce_thumbnail.

Product Image Url

Product image url. size can act as an additional argument. Will default to woocommerce_thumbnail.

Product Stock

Product stock number quantity. Uses interally WooCommerce get_stock_quantity().

Variable Product Stock

This combines all variations of a product and combines the stock value of each to a single number.

Product Rating Count

Number of ratings a product has. Uses interally WooCommerce get_rating_count().

Product Average Rating

Average rating for a product out of 5. This can be used with various Elements like the Rating Element and uses WooCommerce's internal get_average_rating().

Product Review Count

Number of reviews that a product has.

Product Description

The product long description setup in the admin area's product editor.

Product Additional Information

Additional information like attributes and dimensions displayed visually. This uses the WooCommerce action woocommerce_product_additional_information.

Product Reviews

Uses the WordPress comment template to display reviews as comments.

Product Weight

The product weight (if any).

Product Length

The length dimension of a product (if not virtual).

Product Width

The width dimension of a product (if not virtual).

Product Height

The height dimension of a product (if not virtual).

Product Dimensions

The product dimension displayed visually based on WooCommerce settings. This uses the filter woocommerce_product_dimensions and the function wc_format_dimensions.

Product Shipping Class

If the product has a shipping class term assigned to it, this data point will display the term name.

Product Shipping Class Slug

The slug of the shipping class term assigned to the product.

Product Type

The product type. See this guide on the difference between product types.

Product Attribute

The values for a given attribute type for a product. This can sometimes be multiple values. For example, a color or size of a t-shirt. There is a select box for the attribute type you are trying to grab.

See something inaccurate? Let us know