=== CatCode CEE Shipping with GLS for WooCommerce ===
Contributors: catcodestudio
Tags: gls, mygls, parcelshop, parcel locker, cash on delivery
Requires at least: 6.2
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

GLS through MyGLS for Croatia, Czechia, Hungary, Romania, Slovenia and Slovakia: address or ParcelShop / ParcelLocker delivery, labels, tracking.

== Description ==

One WooCommerce plugin for GLS in the six countries served by MyGLS — Croatia, Czechia, Hungary, Romania, Slovenia and Slovakia. Delivery to the buyer's address or to a GLS ParcelShop or ParcelLocker, labels from the order screen, tracking and cash on delivery, on the account you already have in MyGLS.

* Two shipping methods for your shipping zones: GLS courier to the address, and GLS ParcelShop or ParcelLocker.
* Fixed price, free from an order amount (counted the way the cart shows it), free-shipping coupons, weight limit per method.
* ParcelShops and ParcelLockers of the countries you choose, downloaded from MyGLS once a day and kept in your own database: the checkout never waits for GLS while the buyer types.
* Point picker on the classic and on the block checkout: the list starts with the points at the buyer's post code and in the buyer's city; any city, post code, street or point name can be typed. Opening hours are shown, points closed for holidays are left out. Offer shops and lockers, or only one kind.
* The picker appears only while the point method is chosen, and only points of the country of the buyer's address are offered. The buyer's address fields are never rewritten in the browser, so switching to delivery to the address keeps the buyer's own address, and the address saved in the buyer's account stays theirs.
* The order is refused on the server when the point method has no point, a point GLS does not list, a point in another country than the address, or a point that does not take cash on delivery for a cash-on-delivery order — for any checkout. Other shipping methods are never blocked.
* The point is stored on the order (HPOS compatible), optionally written into the shipping address, and shown on the thank-you page, in the account and in e-mails, with the tracking link.
* GLS label from the order screen: street and house number split for GLS (and editable before sending), weight, cash on delivery in the order currency for the payment methods you choose, insurance, the declared parcel value GLS requires for Croatian 20xxx post codes (added on its own), Flexible Delivery Service e-mail and SMS, SMS pre-advice. Label paper A4 (2×2 or 4×1, with the first free quarter), Connect or thermal printer. Print again, refresh the status, delete a label that GLS has not collected yet. Orders shipped with another method can get a GLS label too.
* Live and GLS test system (api.test.mygls.…). Password stored encrypted.
* English, Croatian, Czech, Hungarian, Romanian, Slovenian and Slovak.

**Pro version**

Automatic and bulk labels, printing all labels at once, several parcels per shipment, prices by weight and an hourly status sync are part of a separate Pro version on catcode.com.ua. This plugin works fully on its own, without a time limit.

You need a GLS contract and a MyGLS account (user, password and client number) in the country of the contract.

== External services ==

This plugin connects to MyGLS of the country you choose, only with the credentials you enter:

* MyGLS API (api.mygls.hr, api.mygls.cz, api.mygls.hu, api.mygls.ro, api.mygls.si, api.mygls.sk, or the GLS test systems api.test.mygls.…) — the ParcelShop and ParcelLocker list of the countries you choose (once a day and on "Update now"), creating, printing and deleting labels, parcel statuses.

Sent when you create a label: the order number, weight and parcel size, parcel contents, cash on delivery amount and currency, insured value if you enabled it, the sender data from the settings, and the buyer's name, phone, e-mail and address or chosen point. Nothing is sent to GLS while the buyer is at checkout: the point list is searched in your own database. Tracking links open the public GLS tracking page (gls-group.com).

GLS terms and conditions and privacy policy of the country of your account:

* Croatia: https://gls-group.com/HR/en/terms-conditions/ — https://gls-group.com/HR/en/privacy-policy/
* Czechia: https://gls-group.com/CZ/en/gtc/ — https://gls-group.com/CZ/en/privacy-policy/
* Hungary: https://gls-group.com/HU/en/terms-and-conditions/ — https://gls-group.com/HU/en/privacy-policy/
* Romania: https://gls-group.com/RO/en/gtc/ — https://gls-group.com/RO/en/privacy-policy/
* Slovenia: https://gls-group.com/SI/en/general-business-conditions/ — https://gls-group.com/SI/en/privacy-policy/
* Slovakia: https://gls-group.com/SK/en/general-terms-conditions/ — https://gls-group.com/SK/en/privacy-policy/

This plugin does not connect to catcode.com.ua: the catcode.com.ua addresses in it are ordinary links (plugin page, author).

== Installation ==

1. Install and activate the plugin.
2. WooCommerce → GLS CEE Shipping: choose the GLS country of your contract, enter the MyGLS user, password and client number, fill in the sender and save.
3. Click "Check the connection", tick the countries whose points the checkout offers, save, and click "Update now" to download the points.
4. WooCommerce → Settings → Shipping → your zone → Add shipping method → the methods marked "(GLS CEE)".

== Frequently Asked Questions ==

= The ParcelShop method does not appear at checkout =

It appears once the MyGLS account is saved and the points of the buyer's country are downloaded (the settings page shows how many points each country has). The buyer's address must be in one of the ticked countries. Check also the weight limit of the method.

= MyGLS refuses the label =

The message from MyGLS is shown in the order box and in the order notes. A service your GLS contract does not include (insurance, SMS, Flexible Delivery Service), a missing house number or a phone number GLS cannot read are the usual reasons. Turn on the debug log (source gls-cee-shipping) to see the full answer.

= Can I deliver to points in another country? =

Tick that country under ParcelShops and ParcelLockers. Whether GLS delivers from your country to points abroad, and at what price, is set by your GLS contract.

== Changelog ==

= 1.0.0 =
* First release: GLS through MyGLS for HR, CZ, HU, RO, SI, SK — address, ParcelShop and ParcelLocker delivery; point picker on the classic and the block checkout; labels, tracking, cash on delivery.
