=== CatCode Takealot Connector for WooCommerce ===
Contributors: catcodestudio
Tags: takealot, marketplace, south africa, stock sync, woocommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lists WooCommerce products as offers on Takealot (South Africa) and keeps their prices, RRP, leadtime and stock in sync.

== Description ==

Connects a WooCommerce shop to the [Takealot Marketplace API](https://marketplace-api.takealot.com/v1/docs) with the API key of your own Takealot seller account.

* **Connection** — the API key from the Seller Portal (API Access). "Check connection" reads your seller account: its name, whether leadtime (ship from your warehouse) is on, the leadtime range and your warehouses. The key is stored encrypted.
* **Offers from your products** — tick "Sell on Takealot" in the new "Takealot" tab of a product. Takealot creates an offer for a product it already has in its catalogue, found by barcode: the GTIN / EAN field of WooCommerce, a field of the plugin, or a custom field you name. If your account already has an offer for that barcode, it is linked instead.
* **Existing offers** — "Link offers already on Takealot" reads every offer of your account and links it to your products by SKU or barcode, so nothing is listed twice. Offers already linked get their status and Takealot stock refreshed.
* **Prices** — Takealot takes whole rands with VAT. The selling price is the shop price with VAT (or the sale price while a sale runs) plus a markup in percent and a fixed amount, rounded to the nearest rand or up; or a Takealot price of its own per product. The regular price goes as the RRP, so a sale in the shop shows as a discount. A shop in another currency sends prices converted at the rate you set; without a rate it sends no price instead of a wrong one.
* **Stock** — the stock of the product minus a safety reserve goes as the leadtime stock of the warehouse you choose; a default quantity for products without stock management; 0 for products that are switched off, out of stock, unpublished or in the trash.
* **Leadtime days** — a default and a value per product, kept inside the range your account allows.
* **Automatic** — a change of a product goes into a queue that is sent every 5 minutes, and only what changed is sent. "Send changes now" and "Send all offers again" do it at once.
* **Results** — the offer, its status and the stock in Takealot's own warehouses (CPT, JHB, DBN) in the product, the last runs on the settings screen and an API log of the last 300 requests (without the key).
* Variations: every variation is an offer of its own with its own barcode.
* HPOS compatible.


Takealot is a trademark of its owner. This plugin is an independent integration made by CatCode; it is not an official Takealot plugin and is not affiliated with or endorsed by Takealot. You need your own Takealot seller account.

== External services ==

The plugin connects to the Takealot Marketplace API (`https://marketplace-api.takealot.com/v1/`) only after you enter your API key. The key is sent in the X-API-Key header of each request.

* When you press "Check connection": a request for your seller account (name, leadtime settings, warehouses).
* When offers are linked or sent: the barcode, your SKU, the selling price, the RRP, the leadtime days and the stock of your warehouse for each product you switched on; reading your offers returns their status and stock.

[Takealot Terms and Conditions](https://terms-and-policies.takealot.com/terms-conditions/) · [Takealot privacy policy](https://terms-and-policies.takealot.com/privacy-policy/)

== Installation ==

1. Upload the plugin and activate it. WooCommerce must be active.
2. In the Takealot Seller Portal, as the account owner, open API Access and generate an API key.
3. WooCommerce → **Takealot**: paste the API key, press "Check connection", choose your warehouse, set the exchange rate if the shop is not in rand, and save.
4. If you already sell on Takealot, press "Link offers already on Takealot".
5. Open a product, tick "Sell on Takealot" in its "Takealot" tab, make sure it has a barcode and save. Press "Check the catalogue", then "Send changes now".

== Frequently Asked Questions ==

= Do I need a Takealot seller account? =

Yes. The plugin uses the API key of your own seller account; it does not open an account for you.

= Does it create new products in the Takealot catalogue? =

No. It creates your offers for products Takealot already has in its catalogue, found by barcode. A product that is new to Takealot is added through the Seller Portal (loadsheets) first.

= Where do Takealot barcodes with letters go? =

In the "Barcode for Takealot" field of the product (or of each variation). The GTIN / EAN field of WooCommerce keeps only digits and hyphens, so a code such as MPTAL… cannot be kept there.

= Why is a product skipped? =

It has no barcode, it has no price, or the shop is not in rand and no exchange rate is set. The reason is shown in the "Takealot" tab of the product.

= Why does the stock not change on Takealot? =

Choose your warehouse in the settings: the shop stock is sent as the leadtime stock of that warehouse. Without one, only prices are sent. Stock you already sent to Takealot's own warehouses is managed by Takealot and shown in the product for information.

= Are variations supported? =

Yes. Each variation is an offer of its own and needs its own barcode. The switch is on the variable product.

== Changelog ==

= 1.0.0 =
* First release.
