Title: RockOn Woo Variations Table
Author: Vikas Sharma
Published: <strong>27 février 2018</strong>
Last modified: 27 août 2026

---

Recherche d’extensions

![](https://s.w.org/plugins/geopattern-icon/rockon-woo-variations-table.svg)

# RockOn Woo Variations Table

 Par [Vikas Sharma](https://profiles.wordpress.org/devikas301/)

[Télécharger](https://downloads.wordpress.org/plugin/rockon-woo-variations-table.7.0.0.zip)

 * [Détails](https://fr-ca.wordpress.org/plugins/rockon-woo-variations-table/#description)
 * [Avis](https://fr-ca.wordpress.org/plugins/rockon-woo-variations-table/#reviews)
 *  [Installation](https://fr-ca.wordpress.org/plugins/rockon-woo-variations-table/#installation)
 * [Développement](https://fr-ca.wordpress.org/plugins/rockon-woo-variations-table/#developers)

 [Support](https://wordpress.org/support/plugin/rockon-woo-variations-table/)

## Description

RockOn Woo Variations Table turns WooCommerce’s variation dropdowns into a compact
table, so shoppers can compare and order several products from one page instead 
of visiting each product in turn.

**Features**

 * Shortcode `[rovartable]` and a « Variations Table » block.
 * Pick products by ID, category, tag, or product attribute.
 * Optional columns: image, title, SKU, attributes, price, stock, quantity, basket.
 * Live price, stock, SKU and image updates as options are chosen, with no page 
   reload.
 * AJAX add to basket, including an optional « Add selected to basket » button for
   the whole table.
 * Works without JavaScript: every row falls back to a link to the product page.
 * Accessible markup: real table headers, labelled form controls, live-region status
   messages.
 * Responsive: the table stacks into cards on small screens.
 * Respects the visitor’s light or dark colour scheme.
 * Fully translatable.

**Performance**

Variation data is embedded in the page so option matching happens instantly in the
browser. Products with more variations than the threshold (30 by default, filterable
via `rwvt_ajax_variation_threshold`) fall back to a single AJAX lookup, mirroring
WooCommerce’s own behaviour.

### Shortcode

Basic use:

    ```
    [rovartable id="12,34,56"]
    ```

**Choosing products**

 * `id` — comma separated product IDs, rendered in the order given.
 * `category` — comma separated product category slugs.
 * `tag` — comma separated product tag slugs.
 * `attribute` + `terms` — a product attribute slug and its term slugs, e.g. `attribute
   ="colour" terms="red,blue"`.
 * `exclude` — product IDs to leave out.
 * `categories_exc` — category slugs to leave out.
 * `limit` — maximum number of products (0 = no limit).
 * `orderby` — `date`, `title`, `menu_order`, `ID`, `rand` or `modified`. Default`
   date`.
 * `order` — `ASC` or `DESC`. Default `DESC`.
 * id takes priority: when it is set, the category, tag and attribute filters are
   ignored.

**Controlling the table**

 * `columns` — comma separated, in display order. Available: `image`, `title`, `
   sku`, `attributes`, `price`, `stock`, `quantity`, `button`. Default `title,attributes,
   price,stock,quantity,button`.
 * `thead` — custom header labels, comma separated, replacing the defaults in order.
 * `caption` — a visible caption above the table.
 * `class` — extra CSS classes on the wrapper.
 * `link_titles` — `yes` (default) or `no`.
 * `add_all` — `yes` to show an « Add selected to basket » button. Default `no`.
 * `disabled` — `yes` renders a read-only table with no dropdowns, quantity fields
   or basket buttons. Default `no`.

**Examples**

    ```
    [rovartable id="12,34" thead="Product,Colour,Size,Price,Stock,Qty,Basket"]

    [rovartable category="t-shirts" limit="10" orderby="title" order="ASC" columns="image,title,sku,attributes,price,quantity,button" add_all="yes"]

    [rovartable attribute="colour" terms="red" caption="Everything in red"]<h3>Hooks</h3>
    ```

Filters:

 * `rwvt_product_ids` — the resolved product ID list for a table.
 * `rwvt_table_columns` — the resolved column definitions.
 * `rwvt_render_custom_column` — render a custom column’s cell.
 * `rwvt_no_products_message` — the output when a table matches nothing.
 * `rwvt_script_settings` — the configuration handed to the front-end script.
 * `rwvt_ajax_variation_threshold` — inline variation payload cut-off.

### Upgrading from version 6

**Your existing shortcodes keep working.** `[rovartable id="12,34"]` and `[rovartable
id="12,34" thead="Title,Colour,Size,Basket"]` render the same columns they always
did.

A shortcode that supplies `thead` keeps the version 6 column set (title, one column
per attribute, then basket), because `thead` labels are positional and adding the
new columns would shift every label onto the wrong one. To take the new Price, Stock
and Qty columns, name them explicitly:

    ```
    [rovartable id="12,34" columns="title,attributes,price,stock,quantity,button" thead="Product,Colour,Cost,Availability,Amount,Basket"]
    ```

Shortcodes without `thead` gain the new columns automatically.

**Two behaviour changes to be aware of**

 * `disabled` was accepted but never did anything in version 6. It now renders a
   read-only table. If you had `disabled` on a shortcode, remove it unless you want
   that.
 * `categories_exc` was also accepted and ignored. It now genuinely excludes those
   categories.

**Custom CSS**

These version 6 hooks are unchanged: `.ron-woo-table-section`, `tbody.row-hover`,`
tr.row-2`, `.even`, `.odd`, `td.value`, `td.column-5`, `select.user_vote`.

These are gone, because the markup they belonged to was invalid or buggy: `div.ro-
loader-*`, `input#ron-att-name-*`, `select#ron-attr-*`, and `a#add-cart-*`. The 
basket control is now `button.rwvt-add-to-cart`, and each cell carries `data-column`
so it can be targeted reliably.

**Custom PHP**

    ```
    ron_woo_variations_table(), `ron_woo_variable_add_to_cart()` and `ron_woo_find_matching_product_variation()` still exist as deprecated wrappers, so template customisations will not fatal. They log a deprecation notice when `WP_DEBUG` is on and will be removed in a future major release; move to `do_shortcode( '[rovartable ...]' )`.
    ```

**Custom JavaScript**

The `check_choosed_var` AJAX action and the global `getVarData()` function have 
been removed. The replacement endpoints require a nonce. If you wrote custom scripts
against them, they need updating.

**Requirements**

Version 7 needs WordPress 6.4+, PHP 7.4+ and WooCommerce 8.0+. On older setups WordPress
will not offer the update, so those sites simply stay on version 6 rather than breaking.

## Captures d’écran

[⌊Products shown in table format on the front end.⌉⌊Products shown in table format
on the front end.⌉[

Products shown in table format on the front end.

[⌊Shortcode example.⌉⌊Shortcode example.⌉[

Shortcode example.

## Installation

 1. Upload the `rockon-woo-variations-table` folder to `/wp-content/plugins/`, or install
    it through Plugins  Add New.
 2. Activate the plugin through the Plugins menu.
 3. Add the `[rovartable]` shortcode to any post or page, or insert the « Variations
    Table » block.

WooCommerce must be installed and active.

## FAQ

### Does this work with simple products?

Yes. Simple products are shown as ordinary rows with a working add to basket button.
Where a column does not apply to a product, the cell shows a dash so the table stays
aligned.

### What if two products have different attributes?

The header is the union of every attribute in the table. A product that does not
use one of them shows a dash in that column.

### Can shoppers deep link to a preselected option?

Yes. Append WooCommerce’s usual attribute parameters, for example `?attribute_pa_colour
=blue`, and matching dropdowns are preselected on load.

### Does it work without JavaScript?

The table renders in full, and each row shows a link to the product page instead
of the basket button.

### How do I change the number of variations sent to the browser?

Filter `rwvt_ajax_variation_threshold`. Products above the threshold use a single
AJAX request per selection instead.

### Is it compatible with HPOS and block checkout?

Yes, compatibility is declared for high performance order storage, cart and checkout
blocks, and the product block editor.

## Avis

Il n’y a aucun avis sur cette extension.

## Contributeurs & développeurs

« RockOn Woo Variations Table » est un logiciel libre. Les personnes suivantes ont
contribué à cette extension.

Contributeurs

 *   [ Vikas Sharma ](https://profiles.wordpress.org/devikas301/)

[Traduisez « RockOn Woo Variations Table » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/rockon-woo-variations-table)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/rockon-woo-variations-table/),
consulter le [SVN dépôt](https://plugins.svn.wordpress.org/rockon-woo-variations-table/),
ou s’inscrire au [journal de développement](https://plugins.trac.wordpress.org/log/rockon-woo-variations-table/)
par [RSS](https://plugins.trac.wordpress.org/log/rockon-woo-variations-table/?limit=100&mode=stop_on_copy&format=rss).

## Historique des changements

#### 7.0.0

A full rewrite. Please review your existing shortcodes after updating.

**Security**

 * Both AJAX endpoints now require a nonce and reject unverified requests.
 * All request input is sanitised and validated; product and variation IDs are checked
   for existence, status and parentage.
 * All output is escaped. Fixes a stored XSS vector through the `thead` attribute.
 * Responses use `wp_send_json_*()` instead of echoing raw text.
 * Added an `ABSPATH` guard and directory index files.

**Compatibility**

 * Replaced every deprecated WooCommerce 2.x/3.x call: `$product->id`, array access
   on attributes, and `get_matching_variation()` are gone.
 * Products are loaded with `wc_get_product()` instead of `new WC_Product_Variable()`.
 * Declared compatibility with HPOS, cart and checkout blocks, and the product block
   editor.
 * Fixed PHP 8.1+ deprecation notices.
 * The plugin now degrades to an admin notice when WooCommerce is inactive, instead
   of a fatal error.
 * Added `Requires at least`, `Requires PHP`, `WC requires at least` and `WC tested
   up to` headers.

**Fixes**

 * Table headers and row cells now always line up, even when products have different
   attributes.
 * Removed an invalid `<div>` between `<table>` and `<thead>`.
 * The basket control is a real `<button disabled>`, so an unavailable combination
   can no longer be added.
 * DOM IDs are unique per table instance, fixing collisions between products and
   repeated shortcodes.
 * Add to basket links no longer depend on the current page’s permalink, so they
   work on archives and shop pages.
 * An empty or invalid `id` now shows « No products found. » instead of a blank 
   row.
 * Implemented `categories_exc`, which was previously accepted and ignored.
 * Removed the unused preselected-value code and reimplemented it properly as query
   string deep linking.
 * Each product is now loaded once per table instead of twice.

**Front end**

 * CSS and JS are enqueued only on pages that render a table, and no longer printed
   inline in `wp_head` on every request.
 * Rewritten in dependency-free vanilla JavaScript, so it no longer breaks on themes
   that do not load jQuery.
 * No inline event handlers, so the plugin works under a strict Content Security
   Policy.
 * Assets carry a version string for cache busting.

**New**

 * « Variations Table » block with a live editor preview.
 * Image, SKU, price, stock and quantity columns.
 * AJAX add to basket with cart fragment refresh.
 * « Add selected to basket » bulk action.
 * Product selection by category, tag or attribute.
 * Read-only table mode.
 * Responsive card layout on small screens, and full keyboard and screen reader 
   support.
 * Surface-aware colours: neutral tones are alpha based so they sit correctly on
   any theme background, and the table measures the theme’s actual background rather
   than trusting the operating system’s dark mode preference. A light-only theme
   viewed on a machine set to dark mode keeps readable colours.
 * Complete internationalisation with a `.pot` template.

#### 6.0

 * Earlier releases.

## Méta

 *  Version **7.0.0**
 *  Last updated **il y a 2 mois**
 *  Active installations **Moins de 10**
 *  WordPress version ** 6.4 ou plus **
 *  Tested up to **7.0.7**
 *  PHP version ** 7.4 ou plus **
 *  Language
 * [English (US)](https://wordpress.org/plugins/rockon-woo-variations-table/)
 * Tags
 * [order form](https://fr-ca.wordpress.org/plugins/tags/order-form/)[product table](https://fr-ca.wordpress.org/plugins/tags/product-table/)
   [table](https://fr-ca.wordpress.org/plugins/tags/table/)[variations](https://fr-ca.wordpress.org/plugins/tags/variations/)
   [woocommerce](https://fr-ca.wordpress.org/plugins/tags/woocommerce/)
 *  [Vue avancée](https://fr-ca.wordpress.org/plugins/rockon-woo-variations-table/advanced/)

## Notes

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/rockon-woo-variations-table/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/rockon-woo-variations-table/reviews/)

## Contributeurs

 *   [ Vikas Sharma ](https://profiles.wordpress.org/devikas301/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/rockon-woo-variations-table/)