=== Loch Ness Bracelet Builder ===
Contributors: spiritracking
Tags: bracelet, jewelry, product configurator, gemstone, woocommerce
Requires at least: 6.3
Tested up to: 7.2
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Gemstone bracelet builder for jewellery shops: customers design their bracelet bead by bead and add it to your WooCommerce cart.

== Description ==

Loch Ness Bracelet Builder puts a gemstone bead bracelet builder on your site, with your name, your logo, your colours, your stones and your prices.

Your customers:

* choose their wrist size and bead size (6, 8 or 10 mm),
* place the beads one by one, swap them, add spacers, charms and a clasp or a cord,
* see the bracelet as it will be, with the total price,
* and add it to your cart (WooCommerce), or send you an order request by email.

What the plugin does:

* **A block** to show the builder inside any page: "Loch Ness Bracelet Builder", with language, height and compact layout settings.
* **A shortcode button**: `[lochness_bracelet_builder]` shows a "Design my bracelet" button that opens the builder in a large window over the page (full screen on phones). It is a rounded button with a small bracelet drawing, in the button colours of your theme.
* **WooCommerce cart** (optional): the "Add to cart" button of the builder puts the bracelet in your cart, on its own line, with its full composition in the cart, the order, the emails and the customer account. The price is always calculated again by the Loch Ness service with the prices you set in your client area, never taken from the page.
* **Your own shipping, taxes and payment**: the bracelet is a normal cart line of a hidden "Custom bracelet" product, so your WooCommerce rules apply.
* **6 languages** for the builder: English, French, Spanish, Hungarian, Polish and Czech.

**A Loch Ness shop account is required.** The builder, your stones and your prices are managed in your Loch Ness client area. The account is free during the pilot programme; places are limited and each shop is reviewed. [Apply for the shop programme](https://lochness-paris.com/pwa/partenaire/).

See the builder in action: [lochness-paris.com/pwa/en/](https://lochness-paris.com/pwa/en/).

== External services ==

This plugin connects to the Loch Ness service, run by Loch Ness (Paris, France), at https://lochness-paris.com. Without it the plugin cannot work: the builder, the stones and the prices are provided by this service.

1. **The builder itself** is displayed in a frame loaded from https://lochness-paris.com/pwa/ on the pages where you place the block or the shortcode.
   * When: every time a visitor opens a page with the block, or clicks the shortcode button.
   * What is sent: the usual information of any web request made by the visitor's browser (IP address, browser type, language), your shop key, the builder language and the address of the page that shows the builder (without its query string), so that your client area can show where your builder is online.
   * Inside the builder, visits are counted with GoatCounter (https://www.goatcounter.com/, privacy-friendly statistics without cookies). The bracelet being designed is kept in the visitor's browser.
2. **Price calculation** at https://lochness-paris.com/pwa/api/quote.php, only if WooCommerce is active.
   * When: when a customer clicks "Add to cart" in the builder, and when you press "Check the connection with Loch Ness" in the settings.
   * What is sent: your shop key, the pieces of the bracelet (stone and element numbers, bead sizes), the clasp, the wrist size, the language and the address of the bracelet in the builder. No name, email address or other personal data of your customers is sent.

Loch Ness [terms of use](https://lochness-paris.com/pwa/legal/terms-of-use.html), [privacy policy](https://lochness-paris.com/pwa/legal/privacy-policy.html) and [legal notice](https://lochness-paris.com/pwa/legal/legal-notice.html).

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings → Loch Ness Builder** and enter your shop key (in your Loch Ness client area, "On my website" tab: what follows `?client=` in your builder address; you can paste the whole address).
3. Add the **Loch Ness Bracelet Builder** block to a page (builder in the page), or the shortcode `[lochness_bracelet_builder]` anywhere (button that opens the builder in a large window).
4. With WooCommerce: in your Loch Ness client area (Shop → Orders), tick "Add the bracelet to my shop’s cart" and enter the address of your site in "My website address". Then press "Check the connection with Loch Ness" in the plugin settings.

Shortcode options:

* `text`: the button text (default: "Design my bracelet", in the builder language).
* `lang`: `en`, `fr`, `es`, `hu`, `pl` or `cs` (default: the language chosen in the settings, otherwise the site language).
* `align`: `left`, `center` or `right` (default: the position chosen in the settings).

Example: `[lochness_bracelet_builder text="Create your bracelet" lang="fr" align="left"]`

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. Without WooCommerce, the builder sends you the order requests by email, as set in your Loch Ness client area. With WooCommerce, the bracelet goes into your cart and is paid with your usual payment methods.

= Where do I set my stones, prices and colours? =

In your Loch Ness client area. Changes appear in the builder on your site straight away.

= Can a customer change the price? =

No. The price is calculated again on the Loch Ness server with your prices, every time a bracelet is added to the cart. The hidden "Custom bracelet" product cannot be added on its own.

= Which currency is used? =

The currency set in your Loch Ness client area, which must be the same as your WooCommerce currency. Prices are not converted.

= Can I delete the "Custom bracelet" product? =

Please do not: every bracelet in the cart is a line of this hidden product. You can give it a picture, a tax class and a shipping class.

= Does the plugin add a link to my pages? =

Not by default. In Settings → Loch Ness Builder you can choose to show a small "Bracelet builder by Loch Ness®" line, with a link, under the builder and the button. It stays off until you tick the box.

= I used the plugin "Loch Ness – Bracelet au panier (boutiques)" =

This plugin replaces it and takes over its settings and its hidden product. Activate this one, then deactivate the old one.

== Screenshots ==

1. The builder on a shop page: the customer places the beads one by one and sees the price.
2. Settings → Loch Ness Builder: shop key, language, cart behaviour and connection check.
3. The "Loch Ness Bracelet Builder" block in the editor, with its language, layout and height settings.

== Changelog ==

= 1.0.0 =
* First version on WordPress.org: block (builder in the page), shortcode button (builder in a large window), settings page with a connection check, WooCommerce cart.
