=== Rentora & Sellora Listings ===
Contributors: vmhgroupoy
Tags: rental, booking, marketplace, listings, availability calendar
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show your Rentora rental items with an availability calendar, or your Sellora items for sale, on your own WordPress site.

== Description ==

[Rentora](https://rentora.fi) is a rental marketplace and [Sellora](https://sellora.fi) a marketplace for second-hand and new items, both operated by VMH Group Oy (Finland). This plugin shows your own listings from either service on your WordPress site, so visitors can browse them without leaving your page.

* Responsive grid of your listings with photos, prices and location
* Listing details in a pop-up: photo gallery, description, specifications and prices
* Rentora: availability calendar for the next two months
* Booking and payment happen securely on Rentora / Sellora – buyer protection, card payments and payouts to your bank account. You don't need a shop or payment plugin.
* Six languages: Finnish, English, Swedish, Estonian, German and Spanish, with automatic translation of listing texts
* Search and filters: visitors search your listings by keyword, category and price right on your page
* Search engine friendly: listings are also printed as plain HTML, and every listing gets its own product page on your site with title, description, canonical URL, Open Graph image, schema.org Product data and a sitemap. Works with Yoast SEO and Rank Math.
* Shareable product links that open the listing directly on your site
* Show Rentora, Sellora or both – each service is turned on separately
* Optional: with a Rentora Pro or Sellora Pro subscription, customers book or buy and pay directly on your page (secure checkout by Rentora / Sellora, no account needed)
* Block for the block editor and the shortcode `[vmh_listings]`
* Lightweight: no jQuery, no cookies, styles are isolated so they don't clash with your theme

You need a free Rentora or Sellora account and a public key, which you create in your account under My account → On your own website.

Full instructions: [rentora.fi/wordpress](https://rentora.fi/wordpress) and [sellora.fi/wordpress](https://sellora.fi/wordpress).

== Installation ==

1. In WordPress, go to Plugins → Add New, search for "Rentora & Sellora Listings", install and activate it.
2. The setup page opens. Click "Connect Sellora account" or "Connect Rentora account", sign in and approve. You come straight back to WordPress – no keys to copy.
3. Follow the checklist: turn on payments, add your first listing (Rentora & Sellora → Add listing) and let the plugin create a page for your listings.
4. You can also add the "Rentora & Sellora Listings" block or the shortcode `[vmh_listings]` to any page, and a single listing with the "Single Listing" block or `[vmh_listing service="sellora" id="…"]`.

Prefer not to connect your account? Create a public key in Rentora or Sellora under My account → On your own website and paste it in Rentora & Sellora → Settings. Listings are then shown, but managed in Rentora / Sellora.

Shortcode options (all optional, they override the plugin settings):

* `service` – `rentora` or `sellora`
* `key` – a public key, if you want to show listings from another account
* `lang` – `fi`, `en`, `sv`, `et`, `de` or `es` (default: site language)
* `limit` – number of listings, 1–100
* `columns` – 1–4
* `color` – button colour, e.g. `#0f766e`
* `category` – show only one category, e.g. `peravaunut`
* `search` – `on` or `off` (default: shown when there are more than 6 listings)

Example: `[vmh_listings service="sellora" limit="6" columns="3" lang="en"]`

== External services ==

This plugin displays listings from an external service chosen by the site owner. It is required for the plugin to work.

* **Service:** Rentora (https://rentora.fi) or Sellora (https://sellora.fi), operated by VMH Group Oy, Finland.
* **What is sent and when:** on pages where the block or shortcode is used, the visitor's browser requests the site owner's public listings from `https://rentora.fi/api/v1/listings` or `https://sellora.fi/api/v1/listings`, and listing details from `/api/v1/listings/{id}` when a listing is opened. The request contains the site owner's public key, the display language and the selected category. Like any web request, it also includes the visitor's IP address, browser user agent and the address of the page. Listing photos are loaded from the same service. The plugin sends no other data and sets no cookies.
* **Server requests:** to print the listings as HTML for search engines and to build the sitemap, your WordPress server requests the same public listing data from the API. Responses are cached for 10 minutes. No visitor data is sent.
* **Account connection and management (optional):** when the site owner clicks "Connect account", they are sent to rentora.fi or sellora.fi to approve the connection, and your server receives a private access token that is stored in the WordPress database. With it, the WordPress admin pages request and change the site owner's own listings, photos, orders and bookings through `https://rentora.fi/api/v1/manage/…` or `https://sellora.fi/api/v1/manage/…`. Photos chosen from the media library are uploaded to the service. The service calls back `/wp-json/rsl/v1/refresh` (signed) when listings change, so caches are refreshed right away. Only the site owner's own data is sent; no visitor data.
* **Links:** when a visitor clicks "Book" or "Buy", they go to the listing on rentora.fi or sellora.fi.
* **Booking and checkout on your page (optional):** if the site owner has enabled it in their Rentora or Sellora account, the "Book" / "Buy" button opens the service's booking or checkout page (`https://rentora.fi/upotus/…` or `https://sellora.fi/upotus/…`) in a frame on your page. The visitor enters their name, email address, phone number and, if needed, a delivery address there; this data is sent to Rentora / Sellora to make the booking or order, and payments are processed by Stripe (https://stripe.com/privacy). The plugin itself does not handle or store this data.
* **Terms of use:** https://rentora.fi/ehdot and https://sellora.fi/ehdot
* **Privacy policy:** https://rentora.fi/tietosuoja and https://sellora.fi/tietosuoja

The widget script is included in the plugin and is not loaded from the service.

== Frequently Asked Questions ==

= Does the plugin cost anything? =
No. The plugin and showing your listings are free. Normal Rentora / Sellora service fees apply to bookings and sales.

= Is the key secret? =
No. The key is public and read-only. It only shows your own published listings. You can restrict it to your own domains and revoke it at any time in your account.

= Do I need to handle payments? =
No. Bookings, payments and payouts are handled by Rentora / Sellora.

= Can I show listings from both services? =
Yes. Add two blocks (or shortcodes) with different `service` and `key` values.

= Can I show both Rentora and Sellora listings? =
Yes. Turn on both services in the settings, then add two blocks or shortcodes with `service="rentora"` and `service="sellora"`.

= How do listings appear in Google? =
Each listing gets its own product page on your site (`?tuote=…` on the page that shows the listings) with a title, description, canonical URL and schema.org Product data. The plugin adds its own sitemap to robots.txt; you can also submit it in Google Search Console. The sitemap address is shown on the settings page.

= Can customers buy or book directly on my site? =
Yes, with a Rentora Pro or Sellora Pro subscription and payments enabled in your account. The button appears automatically – no plugin settings needed. Without a subscription, the button takes the customer to the listing on Rentora / Sellora.

= Where do I get help? =
info@rentora.fi or info@sellora.fi, or the instructions at rentora.fi/wordpress.

== Screenshots ==

1. Listings grid on a website.
2. Listing details with photo gallery and availability calendar (Rentora).

== Changelog ==

= 1.2.0 =
* One-click account connection – no keys to copy.
* Manage listings in WordPress: add and edit listings, photos from the media library, publish, hide and delete.
* Orders (Sellora) and booking requests (Rentora) in WordPress with a dashboard widget and a menu badge.
* Setup checklist, help page and contextual help.
* Quantity for Sellora listings: sell several identical items in one listing.
* Single Listing block and `[vmh_listing]` shortcode.
* Real listings shown in the block editor.
* Instant cache and sitemap refresh when listings change (WP Super Cache, WP Rocket, W3 Total Cache, LiteSpeed).
* Google Analytics 4 / Tag Manager e-commerce events (view_item, begin_checkout, purchase).
* Admin pages work on phones.
* Translations: Finnish, Swedish, Estonian, German, Spanish.

= 1.1.0 =
* Search and filters (keyword, category, sort).
* Product page for each listing on your site, printed as HTML for search engines, with title, description, canonical URL, Open Graph and schema.org Product data.
* Sitemap of product pages, added to robots.txt. Works with Yoast SEO and Rank Math.
* Shareable product links.
* Rentora and Sellora can be turned on separately or both at once.
* Booking and checkout on your page for Rentora Pro / Sellora Pro subscribers.

= 1.0.1 =
* "Show more" button when you have more listings than the chosen number.
* The service is detected automatically from the key.
* Finnish translation fixes.

= 1.0.0 =
* First release.
