=== Demfilz Product Table for WooCommerce ===
Contributors: demfilz
Tags: product table, order form, bulk order, wholesale, quick view
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show WooCommerce products in a searchable, sortable, filterable table with quantity boxes, variations, quick view and AJAX add to cart.

== Description ==

**Demfilz Product Table** turns your WooCommerce catalogue into an interactive product table. It suits order forms, wholesale and trade ordering, spare parts lists, menus and any store where customers want to buy quickly without opening every product page.

Add the `[dptw_product_table]` shortcode to any page, build a table visually under **Product Tables**, or insert the **Product Table** block in the block editor.

= Key features =

* **Configurable columns**: image, name, SKU, description, summary, date, categories, tags, price, stock, reviews, weight, dimensions, add to cart, buy, quick view and wishlist. Plus product attributes (`att:pa_color`), custom fields (`cf:my_field`) and any taxonomy (`tax:brand`).
* **Rename any column** with the `Heading:key` syntax.
* **Instant search** that also matches SKUs, with optional suggestions as you type.
* **Click to sort** on every column, with type-aware sorting for text, numbers and dates.
* **Filter dropdowns** for categories, tags, attributes, custom taxonomies and a price range. Dropdowns are searchable, and choosing one filter narrows the others to options that still return products.
* **Filters on top or in a left sidebar**, with a boxed or full-width layout.
* **Pagination** with a "show N per page" menu, or every product on one page.
* **Quantity boxes** with plus and minus steppers that respect each product's minimum, maximum, step and sold-individually settings, including decimal quantities.
* **AJAX add to cart** without leaving the page; the mini cart updates straight away.
* **Multi-select add to cart**: tick several products or variations and add them all at once.
* **Variations** chosen from dropdowns in the row, or one row per variation.
* **Quick view** panel with gallery, zoom, price, stock, description, quantity and add to cart.
* **Lazy load mode** for large catalogues: only the current page of products is queried, with server-side search, sorting and filtering.
* **Eight built-in designs** (default, minimal, bordered, striped, dark, navy, midnight, aqua) plus accent, header, hover and border colour controls.
* **Responsive**: the table turns into a stacked layout on phones.
* **Browser-stored wishlist** that works for guests, with a `[dptw_wishlist]` page.
* **Optional "hide prices" toggle** that a shopper can switch on, remembered across pages.
* **Product page layout** (optional) that matches the quick view, with the gallery beside the details and a description and specifications section below.
* **Archive replacement** (optional) for the Shop page and product category and tag archives.
* **Saved tables**: build a table once and reuse it anywhere with `[dptw_product_table id="123"]`.
* Works with full-page caching: a page served from a cache refreshes its security token on the first request.
* HPOS compatible. Supports simple, variable, external and grouped products.

= Example shortcodes =

`[dptw_product_table]`

`[dptw_product_table columns="image,name,sku,price,stock,add-to-cart" category="hoodies"]`

`[dptw_product_table columns="Photo:image,name,att:pa_color,price,add-to-cart" filters="categories,att:pa_color,price" variations="dropdown" lazy_load="true"]`

`[dptw_product_table id="123"]`

The shorter `[product_table]` tag works too, unless another plugin on the site already uses that name.

= Privacy =

The wishlist, the "hide prices" choice and the table's current filters are kept in the visitor's own browser (localStorage and sessionStorage). Nothing is sent to the server except the product IDs needed to show the saved wishlist.

This plugin does not contact any external service.

== Installation ==

1. Install the plugin through **Plugins > Add New**, or upload the `demfilz-product-table-for-woocommerce` folder to your plugins directory.
2. Activate the plugin. WooCommerce must be installed and active.
3. Go to **Product Tables > Settings** to set the defaults, or add `[dptw_product_table]` to any page.

== Frequently Asked Questions ==

= How do I show only certain products? =

Use the `category`, `tag`, `term`, `product`, `include` or `exclude` attributes. For example `[dptw_product_table category="clothing" exclude_category="sale"]`.

= Which columns can I display? =

id, sku, name, name-summary (title and summary in one column), name-sku (title with the SKU on a second line), description, summary, date, categories, tags, image, price, stock, reviews, weight, dimensions, add-to-cart, buy, quick-view and wishlist, plus `att:attribute`, `cf:custom_field` and `tax:taxonomy`.

= Can customers buy variations from the table? =

Yes. Set `variations="dropdown"` to let customers pick options in the row, or `variations="separate"` to list each variation as its own row.

= Does it work with big catalogues? =

Yes. Turn on `lazy_load="true"` (or enable it in Settings) and products load one page at a time, with search, sorting and filtering done on the server.

= Does it work with page caching plugins? =

Yes. If a cached page carries an expired security token, the first request receives a fresh one and is retried automatically.

= Is there a wishlist? =

Yes. Turn on **Wishlist** in **Product Tables > Settings** and add the `wishlist` column to a table. A heart button also appears in the quick view and on product pages. Put `[dptw_wishlist]` on any page to list the saved products. It is stored in the visitor's browser, so no account is needed.

= Can I change the product page layout too? =

Yes. In **Product Tables > Settings > Product pages**, turn on the detail layout. Product pages then match the quick view, with the gallery on the left or right and the title, SKU, price, stock, quantity and add to cart beside it. A description and specifications section follows, and your theme's reviews, upsells and related products still appear underneath.

= Can I replace my shop page with a table? =

Yes. In **Product Tables > Settings > Archive pages** you can replace the Shop page and the product category and tag archives with a product table.

== Screenshots ==

1. An order form with category and price filters, search, quantity steppers, a variation dropdown in the row and two rows ticked for "Add selected to cart".
2. The quick view panel with price, description, stock, quantity, add to cart and the product image.
3. The navy design with the filters in a left sidebar and one row per variation.
4. On a phone, every row becomes a stacked card with the column names beside the values.
5. The optional product page layout, with the gallery beside the details.
6. The table builder under Product Tables.
7. The settings page, in seven tabs, with the default columns and table options.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
