Mollie

Introduction

With Mollie you are able to create a simple Webshop connected to the Mollie payment provider.

It allows you to add entries as products to your cart, calculate TAX on it and checkout your order with default shipping cost.

Installation

Prerequisites

Make sure your system meets the minimum requirements:

Installation Instructions

Update instructions

License field

This module is using a license field to check if the license for the module is valid or not. On addons.reinos.nl you can check your license and your valid domains.

Control panel overview

In the Module CP you can enter then your license Control panel overview

When you enter a wrong license, the module will not work and it shows you an warning Control panel overview

On a local environment, like *.dev *.local *.localhost the license will be valid for the testing and building new sites.

Important notes

Examples

Examples can be found here

CP Overview

On the CP page you can modify a couple of things.

Settings

Frontend order url

Set this to the url where your order is shown on the frontend.

Currency Symbol

Set a default currency symbol

Shipping price

The default shipping rate

TAX percentage

The percentage TAX for a product

TAX Type

Is the price of a product incl TAX or excl TAX or none?

Email from

The From address

Email from Name

The from name

BCC

Send the mail also to notification one ore more addresses.

Email type

Send it as text or HTML

Default country

Set a default country

Allowed countries

Select the countries that are allowed for the shop

Mollie Mode

Are we in production or in test. Or on local you can set it to manual so you can test the shop on a local site

Logging

What should we log?

Example Templates

The module comes with some default predefined templates that can be used for your shop. On this page you can install them.

Logging

This is where you can track all error logs

Orders

The order overview page. For the detail page we connect the url of your frontend to the order. If you did not set an order template (we suggest you do), it will show the details in a simple page.

License

Enter your license key to activate your module

Setup the store

In order to setup the store you have to follow the following steps.

Add to Cart tag

The tag for adding items to the cart

The tag

{exp:reinos_mollie:add_to_cart}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

return_url

The return url, default to the current url

return_url=""

sku

The SKU for a product. I omitted, it allows you to add a single product multiple lines to your cart.

sky=""

entry_id

Set the entry_id of your product. This way we can collect the ids for later and easy use in the cart

entry_id=""

product_name

Set the name of the product

product_name=""

product_price

Set the price of the product.

product_price="0.00"

clear_cart

When adding a product, your can clear the cart so it always have 1 product in the cart.

clear_cart="no"

disable_shipping

If you have no shipping cost, you can disable it for a product

disable_shipping="no"

form_class

Set the form class

form_class=""

form_id

Set the form id

form_id=""

Cart tag

Loop over the cart variables and items

The tag

{exp:reinos_mollie:cart}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

return_url

The return url, default to the current url

return_url=""

form_class

Set the form class

form_class=""

form_id

Set the form id

form_id=""

prefix

Set a prefix

prefix="cart:"

can_update

Set the cart as updated, so it can update the qty

can_update="yes"

Tag Variable

Below are the Tag Variables. Those Variables can be used in the tag described above

cart:no_items

Check if there are no_items

{if cart:no_items}...{/if}

cart:items

Loop over the items in the cart

{cart:items}
    {cart:name}
    {cart:price}
    {cart:price_plus_tax}
    {cart:qty}
    {cart:sku}
    {cart:entry_id}
    {cart:disable_shipping}
    {cart:price_total}
    {cart:price_total_plus_tax}
{/cart:items}

cart:subtotal

{cart:subtotal}

cart:subtotal_plus_tax

{cart:subtotal_plus_tax}

cart:total

{cart:total}

cart:total_plus_tax

{cart:total_plus_tax}

cart:tax

{cart:tax}

cart:shipping

{cart:shipping}

cart:shipping_plus_tax

{cart:shipping_plus_tax}

cart:entry_ids

Hold all entry_ids as a pipeline delimited string

{cart:entry_ids}

Checkout tag

The Checkout tag

The tag

{exp:reinos_mollie:checkout}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

return_url

The return url, default to the current url

return_url=""

form_class

Set the form class

form_class=""

form_id

Set the form id

form_id=""

Tag Variable

Below are the Tag Variables. Those Variables can be used in the tag described above

global_error

Global errors

{global_error}

has_global_errors

Check for global errors

{if has_global_errors}
   {global_error}
{/if}

has_field_errors

Check for field errors

{if has_field_errors}
   ...
{/if}

field_name:error

Error, if there is one, per field

{customer_first_name:error}
{customer_last_name:error}
{customer_email:error}
{customer_phone:error}
{customer_company:error}
{billing_address:error}
{billing_address2:error}
{billing_zip:error}
{billing_city:error}
{billing_country:error}
{shipping_address:error}
{shipping_address2:error}
{shipping_zip:error}
{shipping_city:error}
{shipping_country:error}

{!-- for example --}
{if customer_company:error != ''}<span class="text-red">{customer_company:error}</span>{/if}

field_name:value

Values, if there is something, per field

{customer_first_name:value}
{customer_last_name:value}
{customer_email:value}
{customer_phone:value}
{customer_company:value}
{billing_address:value}
{billing_address2:value}
{billing_zip:value}
{billing_city:value}
{billing_country:value}
{shipping_address:value}
{shipping_address2:value}
{shipping_zip:value}
{shipping_city:value}
{shipping_country:value}

Country tag

This tag will convert your ISO-2 lang code to a readable one.

The tag

{exp:reinos_mollie:country}DE{/exp:reinos_mollie:country}

Country List tag

Get a select HTML list of all your countries, and also checking the settings for default and allowed countries

The tag

{exp:reinos_mollie:country_list type="billing" class="form-control" value=""}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

class

Set the CLASS for the select

class=""

id

Set the ID for the select

id=""

type

Set to billing or shipping

type="billing"

value

set the default value

value=""

Format tag

Format the price to the correct decimals and currency symbol

The tag

{exp:reinos_mollie:format}9.95{/exp:reinos_mollie:format}

Order tag

The order tag

The tag

{exp:reinos_mollie:order}

Tag Parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above

prefix

Prefix the variables

prefix="order:"

order_id

Set a order_id for the order you want to fetch

order_id=""

hash

Set a hash for the order you want to fetch

hash=""

Tag Variable

Below are the Tag Variables. Those Variables can be used in the tag described above

no_results

Check if there is any result

{if no_results}...{/if}

order:payment_url

The payment url, used when the order is open and should be payed

{if order:status == 'open' }
    Your order is not yet payed, finish your order by clicking <a href="{order:payment_url}">here</a>.
{/if}

order:order_id

{order:order_id}

order:time

{order:time format="%d %M %Y"}

order:transaction_id

{order:transaction_id}

order:status

{order:status}

order:customer_company

{order:customer_company}

order:customer_first_name

{order:status}

order:customer_last_name

{order:customer_last_name}

order:customer_email

{order:customer_email}

order:customer_phone

{order:customer_phone}

order:billing_address

{order:billing_address}

order:billing_address2

{order:billing_address2}

order:billing_zip

{order:billing_zip}

order:billing_city

{order:billing_city}

order:billing_country

The ISO-2 lang code. Convert it with {exp:reinos_mollie:country} to get a readable name

{exp:reinos_mollie:country}{order:billing_country}{/exp:reinos_mollie:country}

order:shipping_address

{order:shipping_address}

order:shipping_address2

{order:shipping_address2}

order:shipping_zip

{order:shipping_zip}

order:shipping_city

{order:shipping_city}

order:shipping_country

The ISO-2 lang code. Convert it with {exp:reinos_mollie:country} to get a readable name

{exp:reinos_mollie:country}{order:shipping_country}{/exp:reinos_mollie:country}

order:items

Loop over the items in the order

{order:items}
    {order:name}
    {order:price}
    {order:price_plus_tax}
    {order:qty}
    {order:sku}
    {order:entry_id}
    {order:disable_shipping}
    {order:price_total}
    {order:price_total_plus_tax}
{/order:items}

order:subtotal

{order:subtotal}

order:subtotal_plus_tax

{order:subtotal_plus_tax}

order:total

{order:total}

order:total_plus_tax

{order:total_plus_tax}

order:tax

{order:tax}

order:shipping

{order:shipping}

order:shipping_plus_tax

{order:shipping_plus_tax}

order:entry_ids

Hold all entry_ids as a pipeline delimited string

{order:entry_ids}

Price Fieldtype

The price fieldtype is a special fieldtype that can hold currency values.

By default the fieldtype field output a numeric value that can be used for the {exp:reinos_mollie:add_to_cart product_price=""} parameter.

Fieldtype Modifiers

Below are the Fieldtype Modifiers. Those Variables can be used in the tag described above

:no_tax

Output the price without TAX and formatted

{your-field-name:no_tax}

:plus_tax

Output the price with TAX and formatted

{your-field-name:plus_tax}

:plus_tax_numeric

Output the price with TAX as a numeric value

{your-field-name:plus_tax_numeric}

:no_tax_numeric

Output the price without TAX as a numeric value

{your-field-name:no_tax_numeric}

:numeric

Output the price, as given as a numeric value

{your-field-name:numeric}

:formatted

Output the price, as given formatted

{your-field-name:formatted}

Changelog

1.0.0 (04-08-2019)