ClassesBigCommerceCustomizerSectionsProduct Archive

Product_Archive

Customizer settings and controls for the Product Archive section.

This class defines constants and methods to register and manage customizer options for the product catalog, including settings for sorting, filtering, slugs, and layout.

  • Full name: \BigCommerce\Customizer\Sections\Product_Archive

Constants

ConstantVisibilityTypeValue
NAMEpublicstring’bigcommerce_product_archive’
ARCHIVE_TITLEpublicstring’bigcommerce_product_archive_title’
ARCHIVE_SLUGpublicstring’bigcommerce_product_archive_slug’
ARCHIVE_DESCRIPTIONpublicstring’bigcommerce_product_archive_description’
SORT_OPTIONSpublicstring’bigcommerce_product_archive_sort_options’
FILTER_OPTIONSpublicstring’bigcommerce_product_archive_filter_options’
CATEGORY_SLUGpublicstring’bigcommerce_category_archive_slug’
BRAND_SLUGpublicstring’bigcommerce_brand_archive_slug’
SORT_FEATUREDpublicstring’featured’
SORT_DATEpublicstring’date’
SORT_SALESpublicstring’sales’
SORT_TITLE_ASCpublicstring’title_asc’
SORT_TITLE_DESCpublicstring’title_desc’
SORT_REVIEWSpublicstring’reviews’
SORT_PRICE_ASCpublicstring’price_asc’
SORT_PRICE_DESCpublicstring’price_desc’
SORT_INVENTORY_COUNTpublicstring’inventory_count’
SORT_SKUpublicstring’sku’
FILTER_CATEGORYpublicstring\BigCommerce\Taxonomies\Product_Category\Product_Category::NAME
FILTER_BRANDpublicstring\BigCommerce\Taxonomies\Brand\Brand::NAME
PER_PAGE_DEFAULTpublicint24
PER_PAGEpublicstring’bigcommerce_products_per_page’
GRID_COLUMNSpublicstring’bigcommerce_catalog_grid_columns’
QUICK_VIEWpublicstring’bigcommerce_enable_quick_view’
SEARCH_FIELDpublicstring’bigcommerce_catalog_enable_search_field’
GENERAL_INVENTORYpublicstring’bigcommerce_general_inventory_settings’

Methods

register

Registers customizer settings and controls for the product archive section.

public register(\WP_Customize_Manager $wp_customize): void

Parameters:

ParameterTypeDescription
$wp_customize\WP_Customize_ManagerWordPress Customizer manager instance.

sort_choices

Retrieves the available sorting choices for the product catalog.

public static sort_choices(): array
  • This method is static.

Return Value:

An associative array of sorting choices with keys and labels.


sanitize_sort

Sanitizes and validates the sorting choices.

public sanitize_sort(array|string $values): array

Parameters:

ParameterTypeDescription
$valuesarray|stringThe sorting choices input to sanitize.

Return Value:

Sanitized sorting choices.


filter_choices

Retrieves filtering choices for the BigCommerce catalog.

public static filter_choices(): array
  • This method is static.

Return Value:

The filtering options available.


sanitize_filter

Sanitizes the provided filter values to ensure they match available choices.

public sanitize_filter(array|string $values): array

Parameters:

ParameterTypeDescription
$valuesarray|stringThe filter values to sanitize.

Return Value:

The sanitized filter values.


get_field_description

Gets the field description for display in the WordPress Customizer.

public get_field_description(): string

Return Value:

The description HTML or an empty string.



Automatically generated on 2025-01-21