Module UltimateMarketPlace EN: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
Line 1: Line 1:
[[Category:Modules]]
[[Category:Modules]]
[[Category:AtooNet]]
[[Category:AtooNet]]
{{TemplateDocDev}}
{{TemplateDocUtil}}


=Module UltimateMarketPlace=
=UltimateMarketPlace module=


==Overview==
==Overview==
Line 8: Line 10:
The '''UltimateMarketPlace''' module is an extension for Dolibarr ERP/CRM published by [https://www.atoo-net.com Atoo-Net].
The '''UltimateMarketPlace''' module is an extension for Dolibarr ERP/CRM published by [https://www.atoo-net.com Atoo-Net].


It provides all the features needed to publish a '''single-vendor online marketplace''': a ready-to-use website template (product catalog, shopping cart, checkout tunnel, customer accounts) built on top of Dolibarr's Website module, to sell your own products and services directly online.
It provides everything needed to publish a '''single-vendor online marketplace''': a ready-to-use website template (product catalogue, cart, checkout, customer accounts, download area), used with the Dolibarr Website module, to sell your own products and services directly online.


It is a simplified fork of the Dolibarr "Marketplace" module (used for dolistore.com), from which everything specific to the Dolibarr association, as well as the multi-vendor / third-party developer module submission and review workflow, has been removed.
It is a simplified fork of the Dolibarr "Marketplace" module (used for dolistore.com), from which everything specific to the Dolibarr association, as well as the multi-vendor circuit / module submission and review by third-party developers, has been removed.


{| class="wikitable"
{| class="wikitable"
Line 18: Line 20:
|Author||Philippe Grand — Atoo-Net
|Author||Philippe Grand — Atoo-Net
|-
|-
|Version||1.0
|Version||24.0.0
|-
|-
|License||GNU GPL v3+
|License||GNU GPL v3+
|-
|-
|Dolibarr minimum||v24.0
|Minimum Dolibarr||v24.0
|-
|-
|PHP minimum||v8.0
|Minimum PHP||v8.2
|}
|}


==Why use UltimateMarketPlace?==
==Why use UltimateMarketPlace?==


UltimateMarketPlace turns your Dolibarr installation into a standalone online shop, without depending on a CMS or a third-party ecommerce platform (such as PrestaShop or WooCommerce). Your catalog, orders, invoices and customers all stay natively inside Dolibarr.
UltimateMarketPlace turns your Dolibarr installation into a standalone online shop, without relying on a CMS or a third-party e-commerce platform (PrestaShop, WooCommerce…). Catalogue, orders, invoices and customers stay natively in Dolibarr.


===Use cases===
===Use cases===


====Selling physical or dematerialized products====
====Selling physical or digital products====
Publish your catalog of products or services directly from Dolibarr product sheets. The module handles both physical goods (with shipping fees) and dematerialized items (downloads, licenses, services).
Publish your catalogue of products or services directly from the Dolibarr product cards: just place them under the root category of the shop. Files attached to the product can be delivered to the customer in their download area after payment.


====Loyalty for professional customers====
====Subscriptions and time-limited licences====
Using automatic discounts for "preferred customers" (a dedicated third-party category), offer a negotiated preferential rate to your best customers, with the option to exclude specific products from the discount.
With the product validity duration and the Dolibarr price levels ("Multiprices"), sell the same product with several subscription durations: download links expire automatically at the end of the purchased period.


====Promotions and coupon codes====
====Preferential prices for your best customers====
Create discount codes (percentage or fixed amount), limited in time or in number of uses, optionally restricted to a specific product, to drive your online sales campaigns.
'''Category discounts''' link a customer category to a product category: the discounted price is displayed automatically as soon as the customer is logged in, with no code to enter.


====Cart upselling====
====Sales campaigns and coupon codes====
Automatically add a complementary product to the cart (e.g. insurance, warranty, eco-contribution), calculated as a percentage of the total and restricted to the countries of your choice.
Create discount codes (percentage or fixed amount), limited in time or in number of uses, each one reserved for a given product, to boost your online sales.


====Online payment====
====Online payment====
Connect the checkout tunnel to the payment methods already configured in Dolibarr (Stripe, PayPal, bank transfer…), either through a classic redirect to your back office, or embedded in a frame inside the shop.
Connect the checkout to the online payment modules already configured in Dolibarr (Stripe, PayPal…), either with a classic redirection to the public payment pages, or embedded in a frame of the shop.


====Audience tracking====
====SEO and audience tracking====
Integrate Matomo Analytics to track traffic and purchase behavior on your shop, without relying on Google Analytics.
Simplified URLs, automatically generated <code>sitemap.xml</code>, <code>robots.txt</code> and <code>llms.txt</code>, Schema.org markup, Google Search Console verification and Matomo Analytics integration to track traffic without relying on Google Analytics.


==Installation==
==Installation==


'''Requirements''': the module requires the following Dolibarr modules to be enabled (they are enabled automatically if needed): Third Parties, Products, Services, Categories, Orders, Invoices, Bank, Mailing and Website.
'''Requirements''':
*Dolibarr 24.0 or later and PHP 8.2 or later;
*the shop pages contain dynamic PHP code: before enabling the module, add the line <code>$dolibarr_website_allow_custom_php = '1';</code> to <code>htdocs/conf/conf.php</code> (value <code>2</code> if the PHP system functions <code>exec</code>, <code>passthru</code>, <code>shell_exec</code>, <code>system</code>, <code>popen</code> and <code>proc_open</code> are not disabled in <code>php.ini</code>). Without this line, Dolibarr refuses to import the website template and the shop remains empty;
*the Dolibarr modules Third parties, Products, Services, Categories, Orders, Invoices, Banks, Emailings and Website are required: they are enabled automatically with the module.


#Download the module from [https://www.dolistore.com DoliStore] or clone the Git repository into <code>htdocs/custom/ultimatemarketplace</code>
#Download the module from [https://www.dolistore.com DoliStore] or clone the Git repository into <code>htdocs/custom/ultimatemarketplace</code>
#Go to '''Home → Setup → Modules/Applications'''
#Go to '''Home → Setup → Modules/Applications'''
#Locate '''UltimateMarketPlace''' in the '''AtooNet''' section
#Find '''Ultimate Market Place''' in the '''Websites and other frontal application''' family
#Enable the module by clicking the button in the ''Enabled'' column
#Enable the module by clicking the button in the ''Enabled'' column


[[File:ultimatemarketplace_activation.png|center|thumb|800px|Activating the UltimateMarketPlace module in the AtooNet section]]
[[File:Ultimatemarketplace-v25-activation-en.png|center|thumb|800px|Enabling the UltimateMarketPlace module]]


On activation, the module automatically performs several actions:
When enabled, the module automatically performs several actions:


*Creates a '''dedicated website''' (reference <code>ultimatemarketplace</code>) with the "website_template-ultimatemarketplace" template imported
*Enables multilingual management (<code>MAIN_MULTILANGS</code>), since product cards can be translated
*Creates a '''root product category''' for items visible on the marketplace
*Creates a '''root product category''' and a "prospect/customer" '''third-party category''' if none is configured yet
*Creates a '''third-party category''' for customers/prospects created from the storefront
*Registers the module's own invoice PDF template
*Adds 3 product '''extrafields''': "Marketplace" separator, comment after price (<code>PriceComment</code>) and public disclaimer message (<code>DisclaimerMessage</code>)
*Creates (or re-enables) a '''dedicated website''' into which the website template provided by the module is imported


==Setup==
'''Update''': after replacing the files, disable then enable the module again (your settings are kept). To bring the website pages in line with the new version, then use the '''Reset website template''' button (see [[#Maintenance mode and template reset|Maintenance mode]]).


The module is configured under '''Home → Setup → Modules/Applications → UltimateMarketPlace''', split into several tabs.
The module declares no permission of its own: the administration pages are reserved for Dolibarr administrators, and the shop pages use their own customer session.


===General: products and third parties===
==Configuration==
 
The module is configured in '''Home → Setup → Modules/Applications → Ultimate Market Place''', spread over several tabs: '''Settings''', '''Setup of payments''', '''Coupon codes''', '''Category discounts''', '''Security''', '''Setup of API server''' (shown only if the REST API module is enabled), '''Matomo Analytics''', '''Carousel''', '''User guide''' and '''About'''.
 
Before opening the website to the public, go through the tabs in this order: Settings (Miscellaneous, Products, Third parties, Website and Email templates sections), Setup of payments, Security, then disable maintenance mode.
 
===Settings===
 
[[File:Ultimatemarketplace-v25-setup-en.png|center|thumb|800px|Settings tab of the module setup]]
 
====Miscellaneous====


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|<code>ULTIMATEMARKETPLACE_NAME</code>||Marketplace name
|-
|<code>ULTIMATEMARKETPLACE_EMAIL</code>||Marketplace contact email
|-
|-
|<code>ULTIMATEMARKETPLACE_ROOT_CATEGORY_ID</code>||Root category for products sold on the marketplace
|Market place name||<code>ULTIMATEMARKETPLACE_NAME</code>||Name of the shop: title of the home page, title of <code>llms.txt</code>, sender name on the PDF invoice
|-
|-
|<code>ULTIMATEMARKETPLACE_ROOT_CATEGORY_ID_BIS</code>||Category featured in the central block of the home page
|Market place description / Market place keywords||<code>ULTIMATEMARKETPLACE_DESCRIPTION</code> / <code>_KEYWORDS</code>||Meta description and keywords of the home page, translatable per language
|-
|-
|<code>ULTIMATEMARKETPLACE_VERSIONS_CATEGORY_ID</code>||Category used by the "Version" widget on the home page
|Market place email||<code>ULTIMATEMARKETPLACE_EMAIL</code>||Public contact email displayed on the website
|-
|-
|<code>ULTIMATEMARKETPLACE_SPECIAL_CATEGORY_ID</code>||Category used by the "Promotions" widget on the home page
|Maintenance mode||<code>ULTIMATEMARKETPLACE_MAINTENANCE_MODE</code>||Closes the shop to the public and blocks sales
|-
|-
|<code>ULTIMATEMARKETPLACE_MIN_PRODUCT_PRICE</code>||Minimum product price (if the product is not free)
|Block new registrations||<code>ULTIMATEMARKETPLACE_BLOCK_REGISTRATION</code>||Closes the creation of new customer accounts
|-
|-
|<code>ULTIMATEMARKETPLACE_DELAY_FOR_NEW</code>||Maximum age (in days) for a product to appear in the "New products" section
|IP addresses allowed to bypass maintenance mode and the registration block||<code>ULTIMATEMARKETPLACE_MAINTENANCE_MODE_ALLOWED_IPS</code>||Whitelist of IP addresses (for example the office one)
|-
|-
|<code>ULTIMATEMARKETPLACE_PROSPECTCUSTOMER_ID</code>||Category assigned to all prospects/customers created from the storefront
|Sidebar cache duration||<code>ULTIMATEMARKETPLACE_SIDEBAR_CACHE_ENABLED</code> / <code>_SIDEBAR_CACHE_DURATION</code>||Sidebar cache in minutes (5 by default), with a button to clear the website cache
|}
|}


===Discounts for preferred customers===
====Products====


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|-
|<code>ULTIMATEMARKETPLACE_PROSPECTCUSTOMER_PREFERRED_ID</code>||Category for third parties labeled "Preferred", eligible for the discount
|Root category for products to sell on the marketplace||<code>ULTIMATEMARKETPLACE_ROOT_CATEGORY_ID</code>||Products/services of this category and its subcategories make up the catalogue (mandatory)
|-
|-
|<code>ULTIMATEMARKETPLACE_PROSPECTCUSTOMER_PREFERRED_DISCOUNT</code>||Discount percentage applied to these third parties
|Category featured in the central block of the home page||<code>ULTIMATEMARKETPLACE_ROOT_CATEGORY_ID_BIS</code>||Optional, the root category otherwise
|-
|-
|<code>ULTIMATEMARKETPLACE_DISCOUNT_EXCLUDE_PRODUCTS_CATEGORY_ID</code>||Category of products excluded from this discount
|Category for the widget "Version"||<code>ULTIMATEMARKETPLACE_VERSIONS_CATEGORY_ID</code>||Products carrying version numbers (downloadable software)
|}
 
===Website===
 
{| class="wikitable"
|-
|-
!Constant!!Description
|Category for the widget "Promotions"||<code>ULTIMATEMARKETPLACE_SPECIAL_CATEGORY_ID</code>||Products displayed with a promotion badge
|-
|-
|<code>ULTIMATEMARKETPLACE_URL_FOR_LOGO</code>||URL of the marketplace logo
|Minimum product price||<code>ULTIMATEMARKETPLACE_MIN_PRODUCT_PRICE</code>||Paid products below this price are excluded from the catalogue
|-
|-
|<code>ULTIMATEMARKETPLACE_THEME_COLOR</code>||Main theme color (buttons, banners, highlighted elements)
|Maximum age (in days) for a product to be visible into the "New products" section||<code>ULTIMATEMARKETPLACE_DELAY_FOR_NEW</code>||30 days by default
|-
|-
|<code>ULTIMATEMARKETPLACE_WEBSITE_ID</code>||Dolibarr website used by the marketplace
|Category to force the "New product" status||<code>ULTIMATEMARKETPLACE_NEW_CATEGORY_ID</code> / <code>_NEW_CATEGORY_MAX_AGE</code>||Forces the "New" badge; a daily scheduled job removes products from it after the given delay
|-
|-
|<code>ULTIMATEMARKETPLACE_USER_MANAGE_WEBSITE</code>||Technical user allowed to perform website actions (adding products, managing third parties, placing orders)
|Enable product validity duration||<code>ULTIMATEMARKETPLACE_ENABLE_PRODUCT_VALIDITY_DURATION</code>||Validity start and end dates on order lines, which drive the expiry of downloads; durations per price level if "Multiprices" are enabled
|}
|}


'''Important''': if you change the associated website (<code>ULTIMATEMARKETPLACE_WEBSITE_ID</code>), existing users, third parties and orders remain linked to the old website and are not migrated automatically.
====Third parties====
 
===Email templates===
 
Three Dolibarr email templates can be customized:
 
*'''Welcome email''' sent when the customer account is created
*'''"Forgot password" email'''
*'''Order confirmation email''' sent to the buyer
 
===Additional product in cart===
 
Automatically adds a complementary product (insurance, warranty, eco-contribution…) to the cart:


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|-
|<code>ULTIMATEMARKETPLACE_ADDITIONAL_PRODUCT_IN_CART_ID</code>||Additional product to add
|Category for all prospects or customers created from the marketplace website||<code>ULTIMATEMARKETPLACE_PROSPECTCUSTOMER_ID</code>||Category assigned to every third party created by the registration form
|-
|-
|<code>ULTIMATEMARKETPLACE_ADDITIONAL_PRODUCT_TOTAL_PERCENT</code>||Price of the additional product, expressed as a % of the cart total
|Enable multiple addresses||<code>ULTIMATEMARKETPLACE_ENABLE_MULTI_ADDRESS</code>||"My addresses" section of the customer account (billing and shipping addresses)
|-
|-
|<code>ULTIMATEMARKETPLACE_ADDITIONAL_PRODUCT_APPLICABLE_COUNTRIES</code>||Country codes where this additional product applies
|Convert prospect to customer on their first payment||<code>ULTIMATEMARKETPLACE_CONVERT_PROSPECT_TO_CUSTOMER_ON_FIRST_PAYMENT</code>||The prospect becomes a customer as soon as their first invoice is paid
|}
|}


===Shipping fees===
====Website====


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|URL for the logo of the marketplace||<code>ULTIMATEMARKETPLACE_URL_FOR_LOGO</code>||Logo of the website header; otherwise the company logo, then a logo provided with the module
|-
|URL of the welcome image / Hide the welcome image||<code>ULTIMATEMARKETPLACE_WELCOME_IMAGE_URL</code> / <code>_WELCOME_IMAGE_HIDE</code>||Banner of the home page
|-
|Main theme color / Secondary theme color||<code>ULTIMATEMARKETPLACE_THEME_COLOR</code> / <code>_SECONDARY_COLOR</code>||Theme colors (<code>#a45931</code> and <code>#333333</code> by default)
|-
|Enable simplified URLs||<code>ULTIMATEMARKETPLACE_FRIENDLY_URLS</code>||URLs such as <code>/en/123-product-name.html</code>
|-
|Google Search Console verification token||<code>ULTIMATEMARKETPLACE_GOOGLE_SITE_VERIFICATION</code>||Verification meta tag
|-
|-
|<code>ULTIMATEMARKETPLACE_SHIPPING_FEES_PRODUCT</code> / <code>ULTIMATEMARKETPLACE_SHIPPING_FEES_PRODUCT_ID</code>||Dolibarr product used to bill shipping fees
|llms.txt description||<code>ULTIMATEMARKETPLACE_LLMS_DESCRIPTION</code>||Presentation sentence of the website in <code>llms.txt</code>
|}
 
===Registration: Google reCAPTCHA===
 
{| class="wikitable"
|-
|-
!Constant!!Description
|User with permissions to perform website operations||<code>ULTIMATEMARKETPLACE_USER_MANAGE_WEBSITE</code>||Technical user used by the shop (creation of third parties, orders…)
|-
|-
|<code>ULTIMATEMARKETPLACE_GOOGLE_RECAPTCHA_REGISTER_FORM</code>||Enables Google Captcha on the registration form
|Website to use for the marketplace||<code>ULTIMATEMARKETPLACE_WEBSITE_ID</code>||Dolibarr website managed by the module, set when the module is enabled
|-
|-
|<code>ULTIMATEMARKETPLACE_GOOGLE_RECAPTCHA_SITE_KEY</code>||Public reCAPTCHA key provided by Google
|Always delete the draft order on logout||<code>ULTIMATEMARKETPLACE_DELETE_ORDER_ON_LOGOUT</code>||Empties the current cart when the customer logs out
|-
|-
|<code>ULTIMATEMARKETPLACE_GOOGLE_RECAPTCHA_SECRET_KEY</code>||Private reCAPTCHA key (keep confidential)
|Show a cookie consent banner||<code>ULTIMATEMARKETPLACE_ENABLE_COOKIE_BANNER</code>||Consent banner on the website
|}
|}


===Payment===
'''Important''': if you change the associated website (<code>ULTIMATEMARKETPLACE_WEBSITE_ID</code>), the users, third parties and orders already created stay linked to the former website and are not migrated automatically.
 
====Email templates====
 
Three drop-down lists let you choose, among the Dolibarr email templates ('''Setup → Emails → Templates'''), the one of the welcome email sent when the account is created (<code>ULTIMATEMARKETPLACE_WELCOME_EMAIL_TEMPLATE</code>), the one of the "Forgotten password" email (<code>ULTIMATEMARKETPLACE_FORGOT_PASSWORD_EMAIL_TEMPLATE</code>) and the one of the buyer's order confirmation (<code>ULTIMATEMARKETPLACE_BUYER_ORDER_CONFIRMATION_TEMPLATE</code>).
 
===Setup of payments===
 
[[File:Ultimatemarketplace-v25-payment-en.png|center|thumb|800px|Setup of payments tab]]


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|Block sales on the marketplace||<code>ULTIMATEMARKETPLACE_BLOCK_SALES</code>||The catalogue can still be browsed but ordering is disabled; forced while maintenance mode is active
|-
|-
|<code>ULTIMATEMARKETPLACE_BLOCK_SALES</code>||Temporarily blocks sales on the marketplace
|Auto close orders on successful payment||<code>ULTIMATEMARKETPLACE_CLOSE_ORDER_AFTER_PAYMENT</code>||Closes the Dolibarr order once the payment is confirmed
|-
|-
|<code>ULTIMATEMARKETPLACE_CLOSE_ORDER_AFTER_PAYMENT</code>||Automatically closes the order after a successful payment
|Select the payment method to use||<code>ULTIMATEMARKETPLACE_MAIN_PAYMENT_METHOD</code>||Dolibarr online payment module used when the order is validated
|-
|-
|<code>ULTIMATEMARKETPLACE_MAIN_PAYMENT_METHOD</code>||Payment method to use
|Include the payment pages provided by Dolibarr inside a frame of the market place shop (advanced users)||<code>ULTIMATEMARKETPLACE_PAYMENT_IN_FRAME</code>||Payment displayed in a frame under the shop domain
|}
|}


Two payment integration modes are available:
Two payment integration modes are available:


*'''Separate page''' (default): no particular setup required, the customer is redirected to the public payment pages of your Dolibarr back office. Drawback: the back office's domain is visible to the customer.
*'''Separate page''' (default): no particular setup, the customer is redirected to the public payment pages of your Dolibarr. Drawback: the back-office domain is visible to the customer.
*'''Frame''' (advanced users): the back office's payment page is called through a URL of the marketplace shop itself. Requires a proxy setup on the marketplace's web server to redirect the requests to the Dolibarr back office. Advantage: the back office's domain stays hidden.
*'''Frame''' (advanced users, Stripe and Stancer): the payment page is called through a URL of the shop itself. A reverse proxy rule is required on the shop web server; a configuration example is displayed on the page once the option is enabled.
 
===Coupon codes===
 
[[File:Ultimatemarketplace-v25-coupons-en.png|center|thumb|800px|Coupon codes tab]]
 
Each coupon code is linked to '''one given product''' and has a discount type (percentage or fixed amount), a value, optional validity dates and maximum number of uses, and an active/inactive flag. The buyer enters the code in the cart: it is accepted only if it is active, within its validity dates, under its usage limit and if the product concerned is in the cart. The usage counter is only incremented when the order is validated.
 
===Category discounts===
 
[[File:Ultimatemarketplace-v25-discounts-en.png|center|thumb|800px|Category discounts tab]]
 
A category discount links a '''customer category''' to a '''product category''' with a discount percentage. For a logged-in customer belonging to this category, the discounted price is displayed directly on the product page and in the cart, with no code to enter. If several rules apply, the highest percentage wins.
 
===Security===


===API===
[[File:Ultimatemarketplace-v25-security-en.png|center|thumb|800px|Security tab]]


{| class="wikitable"
{| class="wikitable"
|-
|-
!Constant!!Description
!Setting!!Constant!!Description
|-
|Captcha provider||<code>ULTIMATEMARKETPLACE_CAPTCHA_PROVIDER</code>||None, Google reCAPTCHA or Cloudflare Turnstile, with their site keys and secret keys
|-
|Enable this protection||<code>ULTIMATEMARKETPLACE_LOGIN_PROTECTION_ENABLED</code>||Limits the login attempts on the shop
|-
|Number of failures before blocking / Duration before unblocking (minutes)||<code>ULTIMATEMARKETPLACE_LOGIN_MAX_ATTEMPTS</code> / <code>_LOGIN_BLOCK_DURATION</code>||5 failures and 15 minutes by default
|-
|-
|<code>ULTIMATEMARKETPLACE_PUBLIC_API_KEY</code>||Public key used to access the products/categories API
|IP addresses allowed to bypass this protection||<code>ULTIMATEMARKETPLACE_LOGIN_BYPASS_IPS</code>||Whitelist (automated tests, trusted network)
|}
|}


The API exposes an XML feed of products and categories, with the parameters <code>categorieid</code>, <code>limit</code>, <code>page</code>, <code>search</code> and <code>lang</code>. A proxy routing setup can be put in place to hide the real API URL behind the shop's own domain.
The captcha and the login protection are disabled by default: configure them before opening registration to the public.


===Matomo===
===Setup of API server===
 
This tab only appears if the Dolibarr '''REST API''' module is enabled. It contains the '''Public API key''' (<code>ULTIMATEMARKETPLACE_PUBLIC_API_KEY</code>, with a button to generate one), passed as the <code>apikey</code> parameter to the two read-only public endpoints added by the module: <code>/api/index.php/ultimatemarketplace/categories</code> and <code>/api/index.php/ultimatemarketplace/products</code>.
 
===Matomo Analytics===
 
[[File:Ultimatemarketplace-v25-matomo-en.png|center|thumb|800px|Matomo Analytics tab]]


{| class="wikitable"
{| class="wikitable"
Line 208: Line 243:
!Constant!!Description
!Constant!!Description
|-
|-
|<code>ULTIMATEMARKETPLACE_ENABLE_MATOMO</code>||Enables Matomo Analytics on the marketplace website
|<code>ULTIMATEMARKETPLACE_ENABLE_MATOMO</code>||Enables Matomo on the website: the tracking code is injected into every page
|-
|-
|<code>ULTIMATEMARKETPLACE_MATOMO_SITE_KEY</code>||Matomo Site ID
|<code>ULTIMATEMARKETPLACE_MATOMO_SITE_KEY</code>||Matomo site ID
|-
|-
|<code>ULTIMATEMARKETPLACE_MATOMO_SERVER_URL</code>||Full URL of your Matomo server
|<code>ULTIMATEMARKETPLACE_MATOMO_SERVER_URL</code>||Full URL of the Matomo server
|-
|<code>ULTIMATEMARKETPLACE_MATOMO_AUTH_TOKEN</code>||Optional authentication token, needed to display Matomo statistics in Dolibarr
|}
|}


===Coupon codes===
===Carousel===
 
[[File:Ultimatemarketplace-v25-carousel-en.png|center|thumb|800px|Carousel tab]]


A dedicated '''Coupon codes''' tab lets you create discount codes:
Settings of the home page carousel: transition type (none, fade, slide), speed in milliseconds, pause on mouse hover and loop. Each slide has an image, an optional link and a title; the order is changed by drag and drop and images are chosen or uploaded through an image selector.


*'''Discount type''': percentage or fixed amount excluding tax
===User guide===
*'''Maximum number of uses''' (leave empty for unlimited use)
*Can be restricted to a '''specific product'''
*Tracks the number of uses already made


[[File:ultimatemarketplace_coupons.png|center|thumb|800px|Coupon codes administration tab]]
[[File:Ultimatemarketplace-v25-guide-en.png|center|thumb|800px|User guide tab]]


The code is verified when applied to the cart: a code that does not exist, has expired, or has already been fully used is rejected ("This coupon code is invalid, expired or already used up").
The '''User guide''' tab displays, in the user's language, a complete guide to configuring and running the module, as text only: the screenshots are on this page.


==Usage==
==Usage==


===Online shop (storefront)===
===Online shop===


The site generated by the module follows the branding defined in the setup (logo, main color) and provides:
[[File:Ultimatemarketplace-v25-shop-home-en.png|center|thumb|800px|Home page of the shop]]


#A product catalog organized by category, highlighting '''new products''' and '''promotions'''
The website generated by the module uses the logo and colors defined in the setup and offers:
#A product sheet showing price, a free-text comment after the price, and a public disclaimer message when configured
#A cart with coupon code redemption, automatic "preferred customer" discount calculation, and the optional additional product
#A checkout tunnel connected to the payment methods configured in Dolibarr
#A customer area (registration, login, order history) protected by Google reCAPTCHA when enabled


[[File:ultimatemarketplace_home.png|center|thumb|800px|Home page of the shop generated by UltimateMarketPlace]]
#a catalogue organised by categories, with the "New" and "Promotions" badges and a carousel on the home page;
#a product page with the price (category discount already applied) and, for products with price levels, the choice of the duration;
#a cart, kept in session until validation, with a coupon code field;
#a checkout linked to the chosen online payment module;
#a customer area: personal information, "My addresses", order history and download area.


===Product tag management===
[[File:Ultimatemarketplace-v25-shop-product-en.png|center|thumb|800px|Product page of the shop]]


The '''UltimateMarketPlace → Products without tags''' menu lists marketplace products/services that have not yet been assigned to a category/tag, so you can bulk-apply one or more tags to them.
Validating the cart creates a standard Dolibarr order; the payment produces a standard Dolibarr invoice.


===Statistics===
===Files delivered to the customer===


The module adds statistics pages dedicated to the marketplace:
The '''Shop files''' tab of the product card shows, for each attached file, whether it is displayed on the public product page. A file ticked "'''Main file'''" or "'''Visible to customer'''" can be downloaded by the customer once their order is paid; a warning is displayed if no file of the product is. If the product validity duration is enabled, the download link expires at the end of the purchased period; otherwise it never expires.


*'''Invoice''' and '''sales''' statistics (grouped by country/VAT rate or by zone/VAT rate)
===UltimateMarketPlace menu===
*'''Customer''' statistics (latest third parties created, latest "preferred" third parties)
*'''Product/service''' statistics (ranked by popularity)


===Order and invoice tracking===
[[File:Ultimatemarketplace-v25-statistics-en.png|center|thumb|800px|Marketplace statistics]]


Two menu entries let you quickly find the orders and invoices coming from the marketplace (filtered on <code>module_source = ultimatemarketplace</code>).
The '''Marketplace''' main menu gives access to:
 
*'''Statistics''': invoice statistics, customer statistics, product statistics, list of sales and, if Matomo is configured, Matomo statistics;
*'''Products without tags''': catalogue products without keywords, to check the quality of the catalogue;
*'''Shopping carts''' and '''Invoices''': standard Dolibarr order and invoice lists, filtered on those coming from the shop.
 
===Maintenance mode and template reset===
 
'''Maintenance mode''' closes the website to the public (except for the allowed IP addresses) and blocks sales. While it is active, the Settings tab offers two buttons:
 
*'''Generate sitemap.xml''': immediately regenerates <code>sitemap.xml</code>;
*'''Reset website template''': re-imports the module's website template into the existing website, '''overwriting the changes made by hand in the page editor'''. To be used after a module update.
 
Remember to disable maintenance mode once the checks are done: it does not turn itself off.
 
===SEO===
 
<code>robots.txt</code>, <code>sitemap.xml</code> and <code>llms.txt</code> are regenerated automatically when the module is enabled, when the Settings tab is opened and after a template reset. Once simplified URLs are enabled, the old URLs remain valid during the transition.
 
==What's new in version 24.0.0==
 
===Compatibility===
*'''Dolibarr 24 and PHP 8.2 minimum''': the module now requires Dolibarr 24.0.0 and PHP 8.2; it is tested up to PHP 8.5. The update check reads <code>versionmodules/ultimatemarketplace/v24/ultimatemarketplace.txt</code>.
*'''Numbering aligned with Dolibarr''': after 1.0.8, the module moves straight to 24.0.0, like the other Atoo-Net modules.
 
===Translations===
*The shop cart block displayed raw keys (<code>quantity</code>, <code>total</code>, <code>shipping</code>, <code>FreeShipping</code>): it now loads the module translations. Reset the website template to benefit from it.
*Added the missing labels of the shop pages (references, VAT, items, adding and removing addresses, registration form checks…) and of the administration messages, in the five languages.
*Translated into French, German, Spanish and Italian the labels that only existed in English.
 
===Documentation and distribution===
*User guide: requirements and compatibility section; the English guide becomes <code>GUIDE_UTILISATEUR-EN.md</code>.
*Wiki page rewritten from the current screens, with screenshots in the five languages.
*DoliStore package build script and continuous integration (dependency installation and syntax check under PHP 8.4 and 8.5).
 
==Previous versions==
 
The details of versions 1.0.0 to 1.0.8 (coupon codes, category discounts, carousel, login protection, simplified URLs, <code>llms.txt</code>, user guide…) are in the <code>ChangeLog.md</code> file shipped with the module.


==FAQ==
==FAQ==


===The marketplace website was not created automatically===
===The marketplace website was not created or the shop is empty===
Check that Dolibarr's '''Website''' module is enabled. If the website still doesn't exist after enabling the module, disable and re-enable UltimateMarketPlace.
Check that the line <code>$dolibarr_website_allow_custom_php</code> is present in <code>conf.php</code>, then disable and enable the module again. Without this line, Dolibarr refuses to import the template pages, which contain PHP code.
 
===The cart block displays "quantity" or "FreeShipping"===
The website still uses the pages of an earlier version of the module. Switch to maintenance mode and click '''Reset website template''' in the Settings tab.
 
===How do I change the website used without losing the existing orders?===
It is not recommended: changing <code>ULTIMATEMARKETPLACE_WEBSITE_ID</code> does not migrate the users, third parties and orders already created to the new website. They remain associated with the former website.


===How do I change the website used without losing existing orders?===
===What is the difference between a coupon code and a category discount?===
This is not recommended: changing <code>ULTIMATEMARKETPLACE_WEBSITE_ID</code> does not migrate existing users, third parties and orders to the new website. They stay associated with the old one.
The coupon code is entered by the buyer and only applies to one given product. The category discount is automatic: it applies to all the products of a category for the customers of a given category, as soon as they are logged in.


===Can I limit the "preferred customer" discount to specific products only?===
===The customer cannot download the purchased product===
Yes, by setting <code>ULTIMATEMARKETPLACE_DISCOUNT_EXCLUDE_PRODUCTS_CATEGORY_ID</code> to a category grouping the products to exclude from the discount.
Check, in the '''Shop files''' tab of the product, that a file is ticked "Main file" or "Visible to customer". The home page of the '''Marketplace''' menu reports products already sold that no longer have a deliverable file.


===Is payment in a frame mandatory?===
===Is payment in a frame mandatory?===
No, it is an option for advanced users. By default, payment simply redirects to the public payment pages of your Dolibarr back office, with no particular server setup.
No, it is an option for advanced users. By default, payment simply redirects to the public payment pages of your Dolibarr, with no particular server setup.


===Which payment methods are supported?===
===Which languages are supported?===
Any payment method already natively supported by Dolibarr (Stripe, PayPal, bank transfer, etc.), selected via <code>ULTIMATEMARKETPLACE_MAIN_PAYMENT_METHOD</code>.
The module and the website template are available in '''French''', '''English''', '''German''', '''Spanish''' and '''Italian'''.


==See also==
==See also==
Line 279: Line 356:
*[https://www.atoo-net.com Atoo-Net — Module publisher]
*[https://www.atoo-net.com Atoo-Net — Module publisher]
*[https://framagit.org/grandoc/ultimatemarketplace Module repository]
*[https://framagit.org/grandoc/ultimatemarketplace Module repository]
*[https://wiki.dolibarr.org/index.php/Module_Website Dolibarr Website module documentation]
*[https://wiki.dolibarr.org/index.php/Module_Website Documentation of the Dolibarr Website module]


==Other languages==
==Other languages==


* [[Module_UltimateMarketPlace_FR|Documentation française du module UltimateMarketPlace]]
* [[Module_UltimateMarketPlace_FR|Documentation en français du module UltimateMarketPlace]]
* [[Module_UltimateMarketPlace_DE|Deutsche Dokumentation für das Modul UltimateMarketPlace]]
* [[Module_UltimateMarketPlace_DE|Deutsche Dokumentation für das Modul UltimateMarketPlace]]
* [[Module_UltimateMarketPlace_ES|Documentación en español del módulo UltimateMarketPlace]]
* [[Module_UltimateMarketPlace_ES|Documentación en español del módulo UltimateMarketPlace]]

Navigation menu