Sortable_table

Welcome to the demo page of ASA2’s Sortable_table template. This specialized template is designed to display multiple products in a sortable table format, making it ideal for showcasing collections or smart collections. With its responsive design, the table adapts seamlessly to various screen sizes, ensuring optimal viewing across devices. Customization is straightforward, allowing you to adjust settings both globally and per shortcode without any programming skills.

Explore the features and customization options of the Sortable_table template to enhance your product displays.

Product name Rating Price
Tower T13005 Filter Coffee Machine with built in coffee grinder, Coarse and Fine Grinding Options, Bean to Cup, 0.6 Litre, 900 W, Black
£49.99
VonShef Filter Coffee Machine - 1.5L Drip Coffee Maker with Hot Plate & Programmable 24 Hour Timer, 900W, Digital Display, Keep Warm Function, Reusable Filter, 12 Cup Capacity - Silver.
£39.99
Aigostar Filter Coffee Machine, Programmable Drip Coffee Maker with 24hr Timer & 40min Keep Warm, Fast Brewing, 1.5L Coffee Filter Machine with Anti-Drip & BPA Free - Benno 30YWZ
£29.74
De'Longhi Filter Coffee Machine, 1.25 Liters, Auto shut off and Anti-Drip system, ICM15210.1 - Black
£37.00
Morphy Richards Equip Filter Coffee Machine, Coffee Maker for Instant Coffee, Pour Over Technology, 10 Cup, Anti Drip, Reusable Filter, Keep Warm, Aroma Blender, Black/Brushed Steel, 162501
£28.50
Russell Hobbs Buckingham Filter Coffee Machine, 1.25L Carafe/10 cups, 1-4 Cup brewing option, Fast brew, 24hr timer, 40min keep warm, Pause & Pour, Washable filter, Auto clean, 1000W, 20680
£42.99
(* = affiliate link / image source: Amazon partner program)

Integration

There are several ways how an ASA2 product template can be integrated into a website.

This video shows how to use ASA2's Gutenberg Block to embed a products into your website using the "Sortable_table" template.

This video shows how to use ASA2's Classic Editor Button to embed products into your website using the "Sortable_table" template.

Wherever you can work with WordPress shortcodes, you can also embed products with ASA2 shortcodes. The template to be used can be defined with the tpl option. Otherwise, the template defined as the default is used.

This shortcode uses the cat_slug option to display products from a specific category and the limit option to limit the quantity to 6.

[asa2_smart_collection cat_slug="filter-coffee-machines" limit="6" orderby="main_price" tpl="Sortable_table" /]

If you want to render this product template directly from PHP, e.g. in an individual page template, you can do this with the function asa2_render_smart_collection.

<?php
$options = array(
    'cat_slug' => 'filter-coffee-machines',
    'limit' => 8,
    'is_available_main' => true,
    'is_prime' => true,
    'rating_gt' => 4,
    'orderby' => 'rand',
    'tpl' => 'Sortable_table'
);
// display the smart collection
echo asa2_render_smart_collection($options);

Customization

On ASA2’s admin page Templates you can customize the general options of template Sortable_table. These settings will effect the display of this template on a global scope.

 

Customization Examples

You can also implement a static table without a sorting function by setting the table_behavior option to 0 and specifying your desired sorting with the smart collection orderby and order option.

[asa2_smart_collection cat_slug="filter-coffee-machines" limit="6" table_behavior="0" orderby="main_price" order="asc" tpl="Sortable_table" /]
Product name Rating Price
Melitta 1025-18 Look V Timer filter coffee machine with thermal jug and timer function, 1080, removable water tank and descaling program, 1.25 liters, black
--
Morphy Richards Equip Filter Coffee Machine, Coffee Maker for Instant Coffee, Pour Over Technology, 10 Cup, Anti Drip, Reusable Filter, Keep Warm, Aroma Blender, Black/Brushed Steel, 162501
£28.50
Aigostar Filter Coffee Machine, Programmable Drip Coffee Maker with 24hr Timer & 40min Keep Warm, Fast Brewing, 1.5L Coffee Filter Machine with Anti-Drip & BPA Free - Benno 30YWZ
£29.74
De'Longhi Filter Coffee Machine, 1.25 Liters, Auto shut off and Anti-Drip system, ICM15210.1 - Black
£37.00
VonShef Filter Coffee Machine - 1.5L Drip Coffee Maker with Hot Plate & Programmable 24 Hour Timer, 900W, Digital Display, Keep Warm Function, Reusable Filter, 12 Cup Capacity - Silver.
£39.99
Russell Hobbs Buckingham Filter Coffee Machine, 1.25L Carafe/10 cups, 1-4 Cup brewing option, Fast brew, 24hr timer, 40min keep warm, Pause & Pour, Washable filter, Auto clean, 1000W, 20680
£42.99
(* = affiliate link / image source: Amazon partner program)

Options

This list contains all the options that are available for ASA2's product template Sortable_table, including examples of how they can be used in conjunction with shortcode.

Columns
OptionTypeValuesDescription
col_image bool "yes" / "no" Show image column
col_image_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Image column responsive settings
col_title bool "yes" / "no" Show title column
col_title_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Title column responsive settings
col_release_date bool "yes" / "no" Show release date column
col_release_date_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Release date column responsive settings
col_rating bool "yes" / "no" Show ratings column
col_rating_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Ratings column responsive settings
col_price bool "yes" / "no" Show price column
col_price_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Price column responsive settings
col_buy_button bool "yes" / "no" Show buy button column
col_buy_button_responsive string
  • "desktop" (Desktop only)
  • "min-tablet-l" (Tablet landscape minimum)
  • "min-tablet" (Tablet minimum (portrait and landscape))
  • "min-mobile-l" (Mobile landscape minimum)
  • "min-mobile" (Mobile minimum (portrait and landscape))
Buy button column responsive settings
Image
OptionTypeValuesDescription
image_size string
  • "small" (Small)
  • "medium" (Medium)
  • "large" (Large)
Image size
image_max_width int 0 between 999 Image max width. In pixels. 0 - 999. 0 for none.
image_effect string
  • "0" (None, no linking at all)
  • "lightbox" (Add lightbox tag and link to large version)
  • "imgpreview" (Image preview to large version on mouse hover)
  • "link_to_shoppage" (Image links to shop page)
Image effect
Title
OptionTypeValuesDescription
title_color string CSS compatible color value, like hex values (#ff0000) or color names (red) Title color. No default. The title will be displayed in the default text color of your page, if none is set here.
title_font_size int 1 between 500 Title font size. In percent.
title_length int 0 between 999 Title max length. Limits the title to a maximum length of characters. 0 for unlimited.
title_auto_height bool "yes" / "no" Title auto length. Applies some CSS rules to achieve one line titles.
Price
OptionTypeValuesDescription
price_color string CSS compatible color value, like hex values (#ff0000) or color names (red) Price color. The color in which the price text is displayed.
Button
OptionTypeValuesDescription
button_target string
  • "shop" (Shop page)
  • "buy" (Buy page)
Button target. Decides whether the button should link to the product page or the buy page.
Misc
OptionTypeValuesDescription
table_behavior string
  • "0" (None)
  • "sortable" (Sortable)
Table behavior
disclaimer string
  • "none" (None)
  • "asterisk_and_text" (Asterisk in title link and button. Disclaimer text in each template.)
  • "asterisk_only" (Asterisk in title link and button. No disclaimer text.)
Disclaimer. Shows a disclaimer text.
custom_css string
  • "none" (None)
  • "asterisk_and_text" (Asterisk in title link and button. Disclaimer text in each template.)
  • "asterisk_only" (Asterisk in title link and button. No disclaimer text.)
Custom CSS. Custom CSS that is applied to all occurrences of this template on a page and is only included once in the source code.