How to use shortcodes of opencart module Product Table
Starting with version 3.0, the opencart module Product Table can be displayed using special shortcodes, and some module parameters can be overridden.
This makes it possible to use the same module instance with different sets of goods.
So what parameters can be used in the shortcode:
Attribute | Description | Example |
id | Integer. Points to an instance of the Product Table module. | [product_table id="10"] |
limit | Integer. Maximum number of products. | [product_table id="10" limit="5"] |
type | String. Allows you to override the module type. Possible values:
| [product_table id="10" limit="5" type="bestseller"] |
product | Comma-separated list of integers. Allows you to specify the product_id of the products to be displayed. Works only with type="custom". | [product_table id="10" limit="5" type="custom" product="56,89,128"] |
filter_manufacturer_type | String. Defines the filter type by manufacturer. Possible values:
Works only with type="filter". If filter_manufacturer_type is not set, but there is a filter_manufacturer parameter, it is assumed that filter_manufacturer_type ="select". | [product_table id="10" limit="5" type="filter" filter_manufacturer_type="detect"] [product_table id="10" limit="5" type="filter" filter_manufacturer_type="select" filter_manufacturer="8,9,25"] |
filter_manufacturer | Comma-separated list of integers. Allows you to specify the manufacturer_id of manufacturers whose products should be displayed. Can be empty if the module needs to be unconfigured. Works only with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8,9,25"] |
filter_category_type | String. Defines the type of filter by category. Possible values:
Works only with type="filter". If filter_category_type is not specified, but there is a filter_category parameter, it is assumed that filter_category_type ="select". | [product_table id="10" limit="5" type="filter" filter_category_type="detect"] [product_table id="10" limit="5" type="filter" filter_category_type="select" filter_category="152,153"] |
filter_category | Comma-separated list of integers. Allows you to specify the category_id of categories whose products should be displayed. Can be empty if the module needs to be unconfigured. Works only with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153"] |
filter_filter_type | String. Defines the filter type according to standard filters. Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" filter_filter_type="0"] |
filter_filter | Comma-separated list of integers. Allows you to specify the filter_id of product filters whose products should be displayed. Can be empty if the module needs to be unconfigured. Works only with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" filter_filter="5,10,18"] |
sort | String. Allows you to configure the sorting of products. Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="random"] |
order | String. Allows you to configure the sort order. Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC"] |
filter_special | Integer. The parameter means "display promotional items first". Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC" filter_special="1"] |
filter_stock | Integer. Enables or disables the filter if available. Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC" filter_stock="1"] |
filter_stock_quantity | Integer. Allows you to exclude goods that are in short supply. For example, if filter_stock_quantity="5", only products with a quantity of 6 or more will be displayed. By default, filter_stock_quantity="0". Works only with type="filter" and filter_stock="1" | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC" filter_stock="1" filter_stock_quantity="5"] |
filter_stock_stock_status | Comma-separated list of integers. This is a list of out-of-stock id statuses. Applies to items with a quantity of 0 or less. Allows you to display, for example, only goods for pre-order Only works with type="filter" and filter_stock="1" | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC" filter_stock="1" filter_stock_quantity="5" filter_stock_stock_status="6,7"] |
cache | Integer. Enables or disables caching of filter results. Possible values:
Only works with type="filter". | [product_table id="10" limit="5" type="filter" filter_manufacturer="8" filter_category="152,153" sort="p.price" order="ASC" cache="1"] |
Thus, once you have configured the appearance of the module (header, columns, order of their output, etc.), you can use this module in different situations, "on the fly" changing the rules for selecting goods.