=== Affiliate Boxes – Amazon Affiliate Product Box, Comparison Table, Pros & Cons Blocks ===
Contributors: marcbittner
Tags: affiliate, amazon affiliate, product box, comparison table, pros and cons
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Affiliate product box, comparison table, pros & cons, verdict and button blocks with free click tracking. Nothing locked.

== Description ==

**Affiliate Boxes** gives your review posts the blocks that earn commissions: an affiliate product box, a comparison table, pros and cons, a review verdict and a call-to-action button. Every block, every option and the click report are free. There is no "premium block" in the inserter that you cannot use.

= Blocks =

* **Affiliate Product Box** – image, badge ("Best overall"), star rating, price with struck-through old price, description, feature list, pros & cons, up to two affiliate buttons and a disclosure line.
* **Affiliate Comparison Table** – compare up to 6 products side by side: image, badge, rating, price, any number of feature rows (type `yes` / `no` for check marks), a button per product and a highlighted "winner" column. Turns into stacked cards on phones.
* **Pros and Cons** – two-column list with check and cross icons.
* **Review Verdict** – score out of 10, summary and button.
* **Affiliate Button** – a call-to-action button.

= Product library =

Define a product once under **Affiliate Products** (name, image, rating, price, pros & cons, features, affiliate link) and pick it in any Affiliate Product Box, Comparison Table column or Affiliate Button. Change the price or link in the library and every post that uses the product updates. Each block also keeps its own copy of the details, so it keeps rendering if you delete the library product. The library is free and has no product limit.

= Built for affiliate sites =

* Links get `rel="sponsored nofollow"` and open in a new tab by default (change it in settings).
* **Click tracking, free:** see clicks per link, post and block for the last 30 days. Stored in your own database. No cookies, no third-party service, no external requests.
* Server-rendered blocks: change the design once and every post updates; no block validation errors after updates.
* Lightweight: one small stylesheet and a 1 KB click script, loaded only on pages that use the blocks.
* Accessible: star ratings and check marks have screen-reader labels, links that open a new tab say so, buttons show a visible keyboard focus ring.
* Amazon Associates friendly: prices typed by hand are hidden on Amazon links (Amazon's policies only allow prices from Amazon or its API), and the "As an Amazon Associate I earn from qualifying purchases." statement is added under the first Amazon box of each post. Both can be changed in settings.
* Works with any theme and with the Site Editor.

= Pro add-on (optional) =

The free plugin is complete on its own. An optional paid add-on adds extras that cost us money to run or support: Amazon price and availability refreshed every hour from Amazon's official API for each visitor's country (US, UK, DE and 19 more storefronts, with the "as of" time Amazon requires), scheduled broken-link scans with email alerts, CSV export of clicks and extra box and table designs. It is a separate plugin with a 14-day free trial that needs no card; installing this plugin never requires it.

== Installation ==

1. Install from **Plugins → Add New**, search for "Affiliate Boxes", click Install and Activate.
2. Edit a post, click **+**, and find the blocks under **Affiliate Boxes**.
3. Fill in the fields in the block settings sidebar. The preview updates as you type.
4. Optional: **Affiliate Boxes** in the admin menu shows clicks and lets you change link settings and the button colour.

== Frequently Asked Questions ==

= Is anything locked behind a paywall? =

No. All five blocks and the click report are fully usable in this free plugin.

= Does it work with Amazon Associates? =

Yes. Paste your tagged Amazon link (or any network's link) into the button URL. Links are marked `sponsored` as Google recommends. Amazon's Associates Program Policies only allow prices that Amazon serves or that come from its API, so a price you type into a box with an Amazon link is not shown, and the plugin adds Amazon's required "As an Amazon Associate I earn from qualifying purchases." statement once per post. The Pro add-on fills Amazon prices from the API with the "as of" time Amazon requires.

= Does click tracking use cookies or send data anywhere? =

No. Each click on a block button sends one request to your own site, which adds 1 to a daily counter. No personal data, IP address or cookie is stored.

= How do I make check marks in the comparison table? =

Write `yes` or `no` in a cell, e.g. `Dishwasher safe | yes | no`.

= How fast do you answer support? =

We answer every thread in this plugin's support forum within 1 business day (Monday to Friday).

= Can I get a refund for Pro? =

Yes. Try Pro free for 14 days with no card first. If you then buy a Pro plan and it does not work for you, ask within 7 days of payment for a full refund, no questions asked. UK/EU buyers: 14-day right to cancel unless they agreed at checkout to immediate access and accepted losing that right. A faulty product is always fixed, replaced or refunded.

= What happens to my content if I deactivate the plugin? =

The blocks stop rendering on the front end. Reactivate and they come back unchanged.

== Screenshots ==

1. Affiliate product box with badge, rating, price, pros and cons.
2. Comparison table with a highlighted winner column.
3. Comparison table on a phone (stacked cards).
4. Block settings sidebar.
5. Click report.

== Changelog ==

= 0.3.0 =
* Amazon compliance: hand-typed prices are hidden on Amazon links; the Amazon Associate statement is added once per post (both in settings).
* Accessibility: links that open a new tab are announced to screen readers, visible focus ring on buttons, ratings no longer read twice, settings checkboxes have labels.
* Performance: on classic themes with WordPress versions that load every block stylesheet on every page, the stylesheet is now left off posts and pages without an Affiliate Boxes block.

= 0.2.0 =
* Product library: define a product once and use it in boxes, comparison tables and buttons across posts.

= 0.1.0 =
* First release: product box, comparison table, pros & cons, verdict and button blocks; click tracking; link settings.
