All our modules
Now showingEU Legal Guarantee Notice and GARAN Label Settings Live demo

Multistore

With several shops, everything the module stores belongs to a shop: its settings, the product guarantees and the brand rules. The shop selector at the top of the back office decides which shops you are working on.

Settings

The settings follow PrestaShop’s usual multistore rules:

Shop contextWhat Save does
One shopSaves the settings of that shop only.
A shop groupSaves them for every shop of the group that has no value of its own.
All shopsSaves the defaults for every shop that has no value of its own.

In a group or in All shops, a blue note under the status line of the settings page reminds you of this. The Compliance checklist and the status line describe the shop you selected; in a group or in All shops they describe PrestaShop’s current shop, usually the default one.

Product guarantees and brand rules

  • A product’s GARAN card, a brand rule and the actions of Assign guarantees write to every shop of the current context: one shop, a group or all shops. A product guarantee goes only to the shops that sell the product.
  • The choice of the guarantee feature and your corrections of its values are settings: they follow the table above.
  • The Products in this shop column of the brand rules counts the products of the current shop.

A shop you add later

A new shop starts with the settings saved in All shops (or in its group), but with no brand rules and no product guarantees: PrestaShop does not copy them when it creates the shop, even when you import the data of another shop. Choose the new shop in the shop selector, set its brand rules and give its products their guarantees with Assign guarantees. Or save the brand rules again in All shops, which writes them to every shop.

Assign guarantees with several shops

In All shops or a shop group, Assign guarantees works on the products of all the shops of the context:

  • A note at the top says how many shops you are working on.
  • Each product shows its guarantee in one of these shops (the shop of the context, otherwise the first of the group). Differs between shops marks a product whose guarantee is not the same everywhere.
  • A source filter or Without guarantee keeps a product only when it applies in every one of these shops.
  • The action bar shows Shops written to, and the confirmation reminds you that the action replaces the product settings in all of them.
  • To change one shop only, choose that shop in the shop selector first.

↑ Back to top

Staff permissions

The module’s pages use PrestaShop’s employee permissions. Because they are not in the back-office menu, PrestaShop gives their rights to only two profiles, and you cannot give them to another profile afterwards.

Who can open the settings

  • Employees with the SuperAdmin profile: always, with every right.
  • Employees with the profile of the employee who installed the module: when the module is installed, PrestaShop gives that profile access to the module’s pages.

The module’s pages are reached from the Module Manager, not from the menu, and PrestaShop does not list such pages in Advanced Parameters › Team › Permissions. Other profiles therefore cannot open the settings page, and there is no box to tick for them.

What each task needs

TaskRight needed
Open the settings, the checklist, the lists and Assign guaranteesAccess to the settings page (SuperAdmin or the installing profile, see above)
Save a section, the brand rules or the value table; send a test email; purge the label cache; the actions of Assign guaranteesThe same, with the right to edit
Create feature “Producer guarantee”The same, and Add on Catalog › Attributes & Features
The GARAN card of a productThe right to edit products: the card is saved with the product

↑ Back to top

Theme integration for custom themes

Classic and Hummingbird need nothing from you. Many other themes work the same way, because they use PrestaShop’s standard hooks. This chapter is for the theme developer when a placement does not show up, or when you want the notice link or a label in a specific place.

The hooks the module uses

PlacementHook
Header linkdisplayNav2
Footer linkdisplayFooterAfter
Listing top / bottomdisplayHeaderCategory / displayFooterCategory
Product page (label and link)displayProductAdditionalInfo; label position alternatives: displayAfterProductThumbs, displayReassurance, displayFooterProduct
Nested label on product cardsdisplayProductListReviews
Cart line / cart linkdisplayCartExtraProductActions / displayShoppingCartFooter
Checkout guarantees and sentencedisplayPaymentTop
Reassurance itemdisplayReassurance
Pop-up window (required)displayBeforeBodyClosingTag
Stylesheet and scriptactionFrontControllerSetMedia

If your theme lacks one of these hooks in a template, the placement does not appear there. Add the hook call to the theme, use the widget below, or use the custom selector for the notice link.

The widget

The module is a PrestaShop widget, so any theme template can place its elements:

{* The notice link, with the link text of the current language *}
{widget name='eugaranlabel' variant='notice-link'}

{* The full GARAN label of a product *}
{widget name='eugaranlabel' variant='label' id_product=$product.id_product}

{* The nested label of a product *}
{widget name='eugaranlabel' variant='badge' id_product=$product.id_product}
  • Without id_product, label and badge use the product of the template (a product card passes it as product=$product), then the product of the product page.
  • A product with a short producer guarantee gets its plain mention instead, and nothing is printed for a product without a guarantee.
  • {widget name='eugaranlabel' hook='displayNav2'} renders exactly what the module shows in that hook, for any hook of the table above.
  • The notice link follows the Style and Open the notice on settings. Switching the notice or the label off in the settings also hides the widget’s output.

The custom selector (no template change)

For the notice link only, Legal notice › Placements offers Custom selector: type the CSS selector of an element of your theme, for example #footer .links or .header-top .right-nav, and choose the Custom selector position. The link is inserted there when the page has loaded, on every page that has the element. If the selector matches several elements, the link goes to the first one; if it matches none, nothing is added.

Styling

  • Everything the module prints uses its own class names starting with eugl-, for example .eugl-notice-trigger, .eugl-label-block, .eugl-badge, .eugl-checkout-guarantees and .eugl-short-guarantee. Style them in your theme’s CSS if needed.
  • The script needs no jQuery and no theme script; the pop-up needs no Bootstrap.
  • Never change the artwork itself (colours, proportions, the QR code, the texts): the official guidelines forbid it, and the module keeps it intact.

Custom order confirmation templates

With the stock order confirmation, the module adds the notice and the labels after the products table: nothing to do. In a customised template you can decide where they go with four placeholders:

PlaceholderGoes inReplaced by
{eugaranlabel_notice}the HTML version (.html)the notice block
{eugaranlabel_labels}the HTML version (.html)the labels of the ordered products
{eugaranlabel_notice_txt}the text version (.txt)the notice as plain text
{eugaranlabel_labels_txt}the text version (.txt)the labels as plain text
  1. Open the order confirmation of your shop or theme: order_conf.html and order_conf.txt, one pair per language in mails/<language>/. If your emails come from an email theme (Design › Email theme), edit the order confirmation layout of that theme and generate the emails again.
  2. In the HTML version, put {eugaranlabel_notice} and {eugaranlabel_labels} each in its own table row or cell, where the blocks should appear.
  3. In the text version, put {eugaranlabel_notice_txt} and {eugaranlabel_labels_txt} each on its own line.
  4. Save, then check the result with Send test email (Emails › Order emails).

An email theme layout produces both versions from one file. Write the placeholders the way the layout writes {products} and {products_txt}:

{% if templateType == 'html' %}{eugaranlabel_notice}{% endif %}
{% if templateType == 'txt' %}{eugaranlabel_notice_txt}{% endif %}
  • A version without a placeholder gets its block after the products, as with the stock template.
  • A template that contains neither the placeholders nor the standard {products} block is left unchanged; the Compliance checklist names it.
  • If you disable or uninstall the module, PrestaShop prints the placeholders as plain text: remove them first.

↑ Back to top

Loading...
Back to top