=== Summa Pricing for WooCommerce Pro ===
Contributors: fsanya
Tags: dynamic pricing, woocommerce, bulk pricing, google merchant center, arukereso
Requires at least: 5.9
Tested up to: 7.1
Stable tag: 1.3
Requires PHP: 8.1
Requires Plugins: summa-pricing
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds bulk pricing, Google Merchant Center and Árukereső price synchronization, and purchase price alerts to Summa Pricing.

== Description ==

Summa Pricing Pro is an add-on for the [Summa Pricing](https://summa-development.com/summa-pricing/) plugin. Summa Pricing must be installed and active for Summa Pricing Pro to work.

= Features =

**Bulk pricing**
Apply margin-based pricing rules across product categories or custom taxonomies from a single screen, or build margin groups that assign a ratio to a hand-picked set of products. Adds the **Bulk Pricing** tab.

**Purchase price change alerts**
Set a percentage threshold. When a product's purchase price changes beyond it, the product is tagged, manual pricing is activated for it, and it appears in a dedicated Purchase Price Change Alerts table for review.

**Google Merchant Center integration**
Connect to Google Merchant Center via OAuth 2.0 to pull GMC prices and recommended prices into the Summa Pricing pricing table. Requires a Google Cloud project with the Content API for Shopping enabled — see the GMC Setup Guide tab for step-by-step instructions.

**Árukereső integration**
Import competitor position and best price data from an Árukereső CSV feed. The data can be synced manually or automatically once per day.

**Quantity discount**
Up to three tiers per product, each with a minimum quantity and either a percentage of the regular price or a fixed unit price, plus an optional name and image. Set them in the Quantity discount box of the product page; the boxes' texts, colours and image are set under WooCommerce > Settings > Summa Pricing > Quantity discount. The cart applies the discounted unit price automatically, and the product page shows each tier as an offer box with its own add-to-cart button (override the markup from your theme at `summa-pricing-pro/quantity-discount/offers.php`). With coupons that exclude sale items, the customer gets whichever discount is bigger. The same settings tab sets the header card shown above the catalogue while a quantity discount filter is active (HUSKY meta checkbox filter on `summapr_qd_tiers`, or the `[summapr_qd_catalog_card]` shortcode).

== Installation ==

1. Install and activate [Summa Pricing](https://summa-development.com/summa-pricing/) first — Summa Pricing Pro will not function without it.
2. Upload the `summa-pricing-pro` folder to the `/wp-content/plugins/` directory, or install via **Plugins > Add New Plugin** in the WordPress admin.
3. Activate Summa Pricing Pro through **Plugins > Installed Plugins**.
4. Go to **WooCommerce > Settings > Summa Pricing** to configure the Google Merchant Center and Árukereső sections.

= Google Merchant Center setup =

Open **Products > Summa Pricing > GMC Setup Guide** for step-by-step instructions on creating a Google Cloud project, enabling the Content API for Shopping, and generating OAuth credentials. Then enter the Client ID, Client Secret, and your Merchant Center ID under **WooCommerce > Settings > Summa Pricing > Google Merchant Center**.

= Árukereső setup =

In **WooCommerce > Settings > Summa Pricing > Árukereső**, paste the CSV feed URL from your Árukereső admin panel. After saving, use the **Refresh External Data** tab to trigger the first sync, or enable daily automatic sync.

== Frequently Asked Questions ==

= Does this work without Summa Pricing? =
No. Summa Pricing Pro extends the free Summa Pricing plugin and requires it to be installed and active.

= I found a bug, or I want to suggest a new feature — what should I do? =
Go to **Products > Summa Pricing > Found a bug? / Feature request** and submit the form, or write to hello@summa-development.com.

== Screenshots ==


== Changelog ==

= 1.3 =
* Fix: The HUSKY Turbo Mode rebuild after a quantity discount change uses HUSKY's current filter settings, so a quantity discount filter renamed in the same request no longer loads empty through AJAX.
* Fix: The product page only shows the quantity discount tiers that can be added to the cart. With stock management on and backorders off, a tier above the stock is hidden instead of offering a button that does nothing, and out-of-stock products show no tiers.
* New: Quantity discount buttons follow the cart: they offer only the pieces still missing from a tier, and show "This discount already applies." once the cart reaches it. Cached pages are corrected through WooCommerce cart fragments.
* New: The texts, colours, corners and image of the quantity discount offer boxes can be set, with a live preview. Theme template overrides can use the new QuantityDiscountFrontend::offer_action() for the cart-aware button.
* New: Quantity discount column and "With / Without quantity discount" filter in the Manual Pricing and Pricing by Stock tables (needs Summa Pricing 1.2).
* Changed: The quantity discount settings moved from their own tab on the Summa Pricing page to WooCommerce > Settings > Summa Pricing > Quantity discount. The list of discounted products is gone; the new table filter shows them.
* Changed: Google Merchant Center, Árukereső and the licence each have their own tab in WooCommerce > Settings > Summa Pricing.
* Changed: Requires Summa Pricing 1.2 or newer.

= 1.2 =
* New: Quantity discount: up to three tiers per product, offer boxes on the product page, discounted unit price in the cart, coupon handling, and a catalogue header card.
* Fix: Purchase price change alerts work on every site: products are flagged with a product meta field instead of a site-specific taxonomy term.

= 1.1 =
* New: "Only GMC" and "Only Árukereső" filters on the Manual Pricing table, moved here from Summa Pricing.
* New: Pagination below the Purchase Price Change Alerts table.
* New: "Sale price from", "Sale price to" and "Notes" columns in the Purchase Price Change Alerts table.
* New: "Discount %" and "Manual price" columns can now be reordered and hidden in the Purchase Price Change Alerts table.
* New: One-click updates from summa-development.com.
* New: Licence check. Pro features are disabled while the site has no active licence; check it any time under WooCommerce > Settings > Summa Pricing.
* Changed: Requires Summa Pricing 1.1 or newer.
* Fix: Bulk Pricing category and custom taxonomy terms follow their term order; product attributes follow their custom order.
* Fix: The sticky table header matches the configured column order in the Purchase Price Change Alerts table.

= 1.0 =
* Initial release