Sortable_table_2

Welcome to the demo page of ASA2’s Sortable_table_2 template. This template is designed to display multiple Amazon products in a responsive, sortable table, making it ideal for showcasing collections or smart collections. The table allows sorting by price, rating, title, and feed rank, providing an interactive and user-friendly experience for your audience.

The Sortable_table_2 template features a responsive design that adapts seamlessly to various screen sizes, switching to a stacked layout on smaller devices to ensure optimal viewing. Customization is straightforward, with options available both globally and per shortcode, allowing you to tailor the table’s appearance and functionality to suit your specific needs without any programming skills.

Explore the features and customization options of the Sortable_table_2 template to enhance your product displays and provide a dynamic browsing experience for your visitors.

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_2" template.

This video shows how to use ASA2's Classic Editor Button to embed products into your website using the "Sortable_table_2" 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_2" /]

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_2'
);
// 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_2. These settings will effect the display of this template on a global scope.

 

Customization Examples

This example uses the smart collection options orderby and order to sort the products by best rating.

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

This example uses the options col_rating to hide the ratings column.

[asa2_smart_collection cat_slug="filter-coffee-machines" limit="6" col_rating="no" tpl="Sortable_table" /]
Product name 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 £34.99
De'Longhi Filter Coffee Machine, 1.25 Liters, Auto shut off and Anti-Drip system, ICM15210.1 - Black £37.59
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 £34.72
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 --
(* = affiliate link / image source: Amazon partner program)

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
£34.72
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
£34.99
De'Longhi Filter Coffee Machine, 1.25 Liters, Auto shut off and Anti-Drip system, ICM15210.1 - Black
£37.59
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_2, including examples of how they can be used in conjunction with shortcode.

Columns
OptionTypeValuesDescription
col_image bool "yes" / "no" Show image column
col_title bool "yes" / "no" Show title column
col_rating bool "yes" / "no" Show rating column
col_price bool "yes" / "no" Show price column
col_buy_button bool "yes" / "no" Show buy button column
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_css string custom text Title font style. Utilizes the CSS font property. Example: "15px arial, sans-serif;"
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.
price_font_css string custom text Price font style. Utilizes the CSS font property. Example: "15px arial, sans-serif;"
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
  • "sort-custom" (Sortable 1)
Table behavior
show_feed_index bool "yes" / "no" Show feed index. Only works when used with [asa2_feed] shortcode.
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.
structured_data string
  • "none" (None)
  • "json_ld" (JSON-LD format)
Structured Data. Include structured data at the end of the template
custom_css string
  • "none" (None)
  • "json_ld" (JSON-LD format)
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.