=== SanBar QuickProducts Entry for WooCommerce ===
Contributors:   sanbazar
Tags:           woocommerce, product, quick entry, variations, mobile
Requires at least: 6.0
Tested up to:      7.1
Requires PHP:      7.4
Stable tag:        1.4
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Compact quick product entry for WooCommerce — variations, attributes, promotional pricing and custom fields, mobile-ready.

== Description ==

SanBar QuickProducts Entry for WooCommerce provides a compact and efficient product registration screen, designed to streamline daily work in WooCommerce stores.

**Main features:**

* Compact layout with all essential fields on a single screen
* Alternate layout mode, switchable per user, for a denser, side-by-side view of fields and descriptions
* Barcode scanner support (automatic field advance)
* GTIN with "GTIN = SKU" option
* Popups for category and brand selection
* Rich text editor for short and long descriptions (bold, italic, underline, font size, font family, text/background color, bulleted and numbered lists, links)
* Image gallery
* Upsell and cross-sell with search by name or SKU
* Product history with pagination and filters
* Automatic brand taxonomy detection
* Real-time SKU and slug validation (Ajax)
* Keyboard shortcuts (Ctrl+S, Tab)
* "QuickProducts" button on the standard product listing
* Digital/downloadable products with file management and media library
* Promotional price with From/Until dates (simple and per variation)
* Responsive layout — fully functional on mobile devices

**Variable products:**

* Global and custom attribute management
* Automatic batch variation generation (O(n) — efficient)
* Manual variation creation with "Any" attribute support
* Variation table with bulk editing of price, SKU, stock and promotion
* Individual image per variation

== Installation ==

1. Upload the `sanbar-quickproducts-entry-for-woocommerce` folder to `/wp-content/plugins/`.
2. Activate the plugin in the WordPress dashboard.
3. Access it through the **SanBar QuickProducts** menu in the admin sidebar. If the companion plugin **SB Softwares Hub** is also active, the plugin will appear grouped under **SB Softwares**.

== Frequently Asked Questions ==

= Does it replace the standard WooCommerce screen? =

No. It is an additional screen accessible from the admin menu.

= Does it work with variable products? =

Yes — full support for attributes, variation generation and editing.

= Does it work on mobile devices? =

Yes — responsive layout with column cards, collapsible filters and bottom sheet style popups. The alternate layout mode is desktop-only and automatically falls back to the standard layout on small screens.

== Screenshots ==

1. Compact product registration screen
2. Category modal
3. Product history with filters
4. Variation table with promotional price column

== Changelog ==

= 1.4 =
* New: replaced the previous custom rich-text editor with Quill.js (bundled locally, no external requests) for both the short and long product descriptions
* New: font size control with a numeric −/+ stepper (8–36px), replacing the previous fixed small/normal/large presets
* New: font family selector with 11 options — default, serif, monospace, Arial, Verdana, Times New Roman, Georgia, Trebuchet MS, Comic Sans MS, Impact, Courier New
* New: text color and background color, sharing the same palette — 9 base colors (red, pink, orange, yellow, green, blue, purple, gray, and a black column whose lightest shade is white) × 3 shades each (light/medium/dark), arranged in aligned rows by shade, plus a custom color picker
* New: bulleted and numbered lists
* New: link insertion and editing through a dedicated modal — select text, click the link button, type or paste the URL; editing or removing an existing link works the same way by clicking on it. A protocol (https://) is filled in automatically when omitted
* Improved: legacy content created with the previous editor (including small/large text) continues to render and remain editable correctly
* Fixed: font size, color and background were saved correctly in the editor but silently stripped by WordPress's HTML sanitization on save (colors were encoded as rgb(), which WordPress's style sanitizer rejects) — values are now converted to hexadecimal before saving, and stripped attributes are allow-listed narrowly (color/background only)
* Fixed: the font, color and background dropdowns in the description editors could render clipped or hidden behind the text area or a neighboring card — the toolbar and dropdown stacking order was corrected so open dropdowns always appear above surrounding content, including in the alternate layout mode
* Fixed: a first-load-only layout glitch where the "Promotional price" toggle and the "Manage downloads" button/counter could render wider or narrower than intended on the Price/Stock card, only correcting itself after switching the layout mode and back — root cause was an unconstrained CSS Grid column; the column and its cells now have an explicit minimum width, matching the pattern already used elsewhere in this layout
* Fixed: the "Manage" button and file counter for downloadable products now stack vertically as intended, instead of side by side
* Fixed: the Price/Stock and Dimensions cards did not shrink proportionally with the other cards in the top row on narrower screens
* Fixed: long labels (card titles, "Manage downloads", "Track stock", "Promo") could wrap awkwardly on narrower screens instead of truncating with an ellipsis

= 1.3 =
* Confirmed compatibility with WordPress 7.1 "Mary Lou" — reviewed against the official 7.1 Field Guide (enforced iframed post editor, jQuery UI 1.14.2 update, SVG Icon API, Abilities API, and related changes); none of these affect this plugin, as it runs as a standalone admin screen and does not register blocks, hook into the post editor, or depend on jQuery UI
* Updated "Tested up to" to 7.1

= 1.2 =
* New: Layout mode toggle — an alternate, denser display pattern for the basic information card, switchable at any time and remembered per browser, with three responsive breakpoints that progressively stack its columns on narrower screens
* Improved: interface adjustments across the basic information card aimed at better visual quality and clarity
* Fixed: reading and writing the GTIN/UPC/EAN/ISBN field now uses WooCommerce's official get_global_unique_id()/set_global_unique_id() methods (WC 9.1+) instead of generic post meta calls, resolving a "is_internal_meta_key was called incorrectly" notice and keeping the field properly indexed for native WooCommerce search
* Fixed: inline SVG icons are now explicitly sanitized with an attribute allowlist before output, resolving Plugin Check "OutputNotEscaped" warnings across several templates
* Fixed: "Track stock" checkbox label was not registered for translation and always displayed in Portuguese regardless of site language
* Fixed: "Custom" attribute type option in the attribute dropdown was left untranslated in the Portuguese (pt_BR) language file
* Updated .pot/.po/.mo language files

= 1.1 =
* Fixed: dozens of interface strings (variations, attributes, custom fields, product history) were hardcoded in Portuguese in the JavaScript files and did not translate even on non-Portuguese sites — all now route through the plugin's translation system
* Fixed: delete-confirmation dialog no longer loses the product name when the site language is not Portuguese
* Fixed: variation-generation error handling no longer depends on matching translated server text, preventing a friendly error message from silently failing to appear on non-Portuguese sites
* Fixed: two admin screen labels ("Variation", "Visible") that displayed in Portuguese regardless of site language
* Fixed: tag sorting no longer forces Brazilian Portuguese collation on non-Portuguese sites
* Added ~140 new translation strings, with full English (en_US) and Portuguese (pt_BR) translations
* Updated .pot/.po/.mo language files

= 1.0 =
* Initial public release
* Mobile-ready layout with collapsible cards
* Promotional price with from/to dates (simple and variable products)
* Digital/downloadable products with file popup and media library integration
* Variation generation optimized to O(n)
* "Any" attribute support per variation
* Custom Fields via wp_postmeta with management modal
* Brands and Tags merged into single card
* Rich editor functional on mobile and desktop
* Real-time SKU and slug validation
* Keyboard shortcuts (Ctrl+S, Tab)
* Full PHPCS compliance — zero errors
* "+" button for tags on mobile devices
