=== La Rând: Online Booking for Salons ===
Contributors: larandmd
Tags: booking, appointments, salon, barbershop, beauty
Requires at least: 6.3
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

Online booking for salons and barbershops: a floating button, a booking button or a booking form on your WordPress site.

== Description ==

[La Rând](https://larand.md) is an appointment platform for salons, barbershops and beauty professionals in Moldova. This plugin puts your La Rând booking on your WordPress site, so your clients can book a time without leaving your pages and without creating an account.

You need a salon on La Rând. The plugin does not replace your settings there: services, specialists, working hours and the look of the button stay in your La Rând account, and the plugin only shows them on your site.

**What you can add**

* **A floating button** that stays in the corner of the page and opens the booking on top of your page. Show it on all pages or only on the pages you choose.
* **A booking button or link** anywhere in your content, with the `[larand]` shortcode, the "La Rând booking" block or the "La Rând booking" Elementor widget.
* **A booking form inside a page** with `[larand type="inline"]`, for a "Book online" page.

**Features**

* Works with salons and with networks of salons.
* Pre-select a service or a specialist on a button (`service` and `specialist` attributes).
* Language is picked from your site: Russian sites get the Russian booking, all others get Romanian. Works with WPML, Polylang, TranslatePress and the site language. Use the `la_rand_lang` filter to change it.
* Block editor block without a build step, and an Elementor widget when Elementor is active.
* The script is loaded only on pages that need it.
* No cookies, no tracking, no calls to other sites from your server.
* Translated into Romanian and Russian.

**Shortcode**

`[larand text="Book an appointment"]` shows a button.

`[larand type="inline"]` shows the booking form in the page.

Attributes: `type` (`button` or `inline`), `text`, `salon` or `network` (to use a different salon than the one in Settings), `service`, `specialist` (numbers from La Rând), `class`, `style="plain"` (a plain link without the button look).

== Installation ==

1. Install the plugin from the Plugins screen, or upload the `la-rand` folder to `/wp-content/plugins/`.
2. Activate it.
3. Go to Settings, La Rând. Enter your salon address on La Rând (for example `oxo-barber-studio`) and press Check to see your booking page.
4. In La Rând, open Panel, "On your website", and turn on "Booking on your website". It is off by default, so nobody can put your booking on a site without you.
5. Choose where the floating button shows, or turn it off and use the shortcode, block or Elementor widget.

Where to find your address: sign in to La Rând, open Panel, then "On your website" (larand.md/pro/panou/site). The address is also the last part of your salon link, for example larand.md/s/oxo-barber-studio.

== Frequently Asked Questions ==

= The button does not show on my site =

In La Rând, open Panel, "On your website", and turn on "Booking on your website". Until it is on, the plugin does not show the button or the form. Your browser console says the same.

= Do I need a La Rând account? =

Yes. Create your salon at [larand.md/pro](https://larand.md/pro). The plugin only shows the booking of an existing salon.

= Does it cost anything? =

The plugin is free. La Rând has its own plans for salons, see larand.md/pro.

= Where do I change the look of the floating button? =

In La Rând, under Panel, "On your website". The plugin lets you override only the text and the side (left or right).

= The floating button does not show. =

Check that the address in Settings is right (press Check), that the button is not turned off, and that the page is one of the chosen pages. A page that has a booking form inside it does not show the floating button.

= Does it use cookies? =

No. The booking widget does not use cookies and the plugin does not either.

= Can I use it with Elementor? =

Yes. When Elementor is active, a "La Rând booking" widget appears in the widget panel.

= Which languages does the booking support? =

Romanian and Russian. Sites in Russian get the Russian booking, all other sites get Romanian.

= Can I point the plugin to a test copy of La Rând? =

For developers: define `LA_RAND_ORIGIN` in `wp-config.php`, or use the `la_rand_origin` filter, for example `add_filter( 'la_rand_origin', function () { return 'https://staging.example.com'; } );`. The address is used for `widget.js`, the "Check" link and every booking link. The default is `https://larand.md`.

== Screenshots ==

1. Settings, La Rând: salon address, floating button, pages.
2. The "La Rând booking" block in the block editor.
3. A booking button on a page and the booking dialog it opens.
4. The booking form inside a page.

== External services ==

This plugin loads and uses the booking widget of La Rând (larand.md), a service operated by CASÎR AGENCY SRL, Republic of Moldova. Without it the plugin shows nothing, because the booking itself runs on larand.md.

**What is loaded.** On the pages that show a floating button, a booking button or a booking form, the visitor's browser loads the script `https://larand.md/widget.js` and, in the same way, the salon's look settings from `https://larand.md/w/api/{salon}/config`. Your server does not call larand.md.

**When the visitor opens the booking.** The script shows the booking page from `https://larand.md/w/{salon}` inside an iframe (a dialog over the page, or a form inside the page). With that request the visitor's browser sends larand.md what any web request carries (IP address, browser data), plus:

* the host name of your site (for example `example.com`), so that La Rând knows from which site the booking comes;
* the page language (`ro` or `ru`);
* the salon address (slug) you entered in Settings, and the service or specialist number if you set them on a button;
* that the booking comes through this plugin (`via=wordpress`).

If the visitor makes a booking, the details they type in the form (name, phone, email, note) and the chosen service and time are sent to larand.md and to the salon. The plugin itself does not see or store them.

The widget does not set cookies and does not read anything else from your page.

* Terms of use: https://larand.md/termeni
* Privacy policy: https://larand.md/confidentialitate

== Changelog ==

= 1.0.0 =
* First release: settings page, floating button on chosen pages, `[larand]` shortcode, "La Rând booking" block, Elementor widget, automatic language (WPML, Polylang, TranslatePress, site language).

== Upgrade Notice ==

= 1.0.0 =
First release.
