=== Factorize Guides ===
Contributors: webyoungstown
Tags: buying guides, seo, woocommerce, collections, long-tail
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.1.0
Requires PHP: 7.4
License: Factorize License (proprietary)
License URI: https://factorize.webyoungstown.com/license/

Buying guides made from your catalogue for searches like "best cordless drill under $100", with guardrails that keep thin pages out of search.

== Description ==

Factorize Guides suggests guide topics from your own data, and you pick the ones you want. A guide is a page under /guides/ that lists the products matching a saved query (a category, a price range, a brand or attributes, a condition, in stock only, an order) with a comparison table. The list and the table are always read from your products, so prices and stock stay true. You add an intro, a short "how to choose" section and questions, or have AI draft them from the real product facts.

= What you get =

* **Ideas.** Categories with price bands, brands, attributes, the words visitors typed in your store search (Store Stats) and Factorize Market demand, each with the number of in-stock products and a Worth it score. Nothing is created until you press a button.
* **Guides.** A page for each guide at /guides/<name>/ and an index at /guides/. Product cards come from your theme. Filter chips, a comparison table that scrolls inside its own box on a phone, a question accordion, a last-updated date from the product data, a link to the category and three related guides.
* **AI draft.** Intro, tips and questions written from facts only (name, brand, price, condition, rating, listed details). Any number or name that is not in the facts is listed for you to check. The draft stays apart until you press Use this draft.
* **Guardrails.** 4 or more products in stock to publish; noindex until you mark a guide Reviewed; a guide that falls below 4 is set to noindex and, after 30 days, redirects (301) to its category; at most 5 new guides a week; a warning when two guides share more than 70% of their products; the sitemap lists only reviewed guides above the minimum.
* **Fast.** A guide page is read from one cached copy. The plugin's stylesheet and script load on guide pages only. Rebuilding, the rules and the ideas run on the plugin's own screen and in WP-Cron.

= Works with =

WooCommerce (needed), Factorize Market (demand and ranking), Store Stats (search words), Factorize Schema (FAQ markup) and Factorize Core or Factorize AI (drafts).

== External services ==

Drafting with AI is the only feature that talks to another service, and only when you press Draft with AI.

**The Factorize server** (https://factorize.webyoungstown.com, run by WebYoungstown, the maker of this plugin), when AI is set to Factorize AI. Every request is signed with your site's Factorize key. What is sent: the title of the guide and the facts of up to 12 matching products (name, brand, price, condition, rating, listed details), this site's address and the Factorize key's site identity. Product descriptions, reviews, customer data and orders are never sent. Terms and privacy: https://factorize.webyoungstown.com/license/ and https://factorize.webyoungstown.com/privacy/

**Your own Ollama server**, when you choose it in Settings: the same text goes to the address you set, and nowhere else.

With AI switched off nothing leaves your site.

== Installation ==

1. Upload the `factorize-guides` folder to `/wp-content/plugins/` and activate it (WooCommerce must be active).
2. Open Factorize → Guides, pick an idea and press Make a draft guide.
3. Write an intro (or press Draft with AI), Save, Publish, read the page, then mark it Reviewed.

== Frequently Asked Questions ==

= Does it create pages by itself? =

No. Ideas are only suggestions. Every guide is made when you press a button, and it is noindex until you mark it Reviewed.

= Why can't I publish my guide? =

It needs at least 4 products in stock, a title, and room under the weekly limit (5 new guides in 7 days by default). The message says which.

= What happens when products sell out? =

Below 4 in stock the guide is set to noindex at the next check (a minute after a product changes, and daily). After 30 days still below 4 it redirects to its category. It comes back by itself when stock returns.

= How does it know a product is used? =

From a condition field, a Condition attribute, or a tag or category that says used, refurbished or open box. Nothing is guessed.

= What is removed when I delete the plugin? =

Settings, caches and the "Featured in" fields on products. Your guides stay unless you ticked "Remove my guides when the plugin is deleted" under Settings.

== Changelog ==

= 1.0.1 =
* Fix: product cards were empty (no picture, name or price) when a guide's cache was built outside a page view (WP-Cron, WP-CLI, an admin save). The card hooks are loaded first; a grid without names falls back to plain cards. Guide pages use the theme's surface color, so they read in light and dark palettes.

= 1.0.0 =
* First release: ideas, saved-query guides, comparison table, filter chips, FAQ, related guides, AI draft from facts only, guardrails, cached pages, core sitemap rule, Featured in links.
