Mella CMS · user guide

16. The e-shop

Who: admins set the shop up; editors and admins manage products and orders.

The e-shop is an add-on. It lets visitors put products in a cart and pay for them with Stripe (cards) or PayPal. You can sell physical products (you ship them) and digital ones (the buyer downloads a file). Until you switch it on, the shop does not exist: no menu items, no pages, no blocks.

What you need

Switching the shop on

  1. Open Settings and the E-shop section.
  2. Paste the activation code and click Activate. Below the field you see whether the code is valid and until when.
  3. Tick Switch the e-shop on.
  4. Choose the currency, the shipping cost for physical products and from which amount shipping is free (0 = never free). Prices always include VAT.
  5. Optionally choose a terms of sale page: buyers must tick a box that links to it before they pay.
  6. Optionally enter an address for new order notices (otherwise the contact address is used).
  7. Click Save settings.

A Shop group (Products, Orders) now appears in the left menu, and the Shop blocks appear in the page builder.

If you remove the activation code, the shop switches itself off. Your products and orders are kept.

Setting up payments

Do this in Settings → E-shop → Payments. Keys are write-only: after saving you see only that they are stored.

Stripe

  1. In the Stripe dashboard copy the secret key (sk_live_…, or sk_test_… for testing) into Stripe secret key.
  2. Add a webhook in Stripe for the event checkout.session.completed. Its address is shown under the key fields, for example https://example.com/api/shop/webhook/stripe.
  3. Copy the webhook's signing secret (whsec_…) into Stripe webhook signing secret.

PayPal

  1. In the PayPal developer dashboard create an app and copy its Client ID and Secret.
  2. Choose Sandbox (testing) while you try things out, and Live when you are ready. Sandbox and live use different keys.

A payment method appears in the checkout only when its keys are filled in. Test with the test keys first: place an order yourself and check that it arrives under Orders.

Products

Open Products and click New product.

Digital products. Save the product first, then use Download to upload the file (PDF, zip, e-book, audio, …). Set how many times the buyer may download it and for how many days the link works. The file is stored outside the public files; nobody can open it without the buyer's personal link.

What visitors see

Each category and tag has its own page, /shop/category/<address> and /shop/tag/<address>, which shows only its products. The shop page lists the categories as small links above the products, and the product page shows the product's own.

To put products on another page, such as the home page, add the Product grid block. The Cart link block adds a button to the cart, for example in the header; it can have an icon (cart, bag or basket) or a picture of your own, and the number of items in brackets or in a small badge. The Product categories block lists the categories or tags, and Product grid can show one category only. Both are in the Shop group of the page builder.

The shop's pages use your header and footer from Design.

Designing the shop's pages

When the shop is on, Design shows five more templates next to Header, Footer and Post: Shop (the list of products), Product, Cart, Checkout and Order. Open one and change it like any other page: move, add and remove blocks, and style them in the Design tab (colours, fonts, spacing, corners).

In the builder these blocks show made-up sample products and orders, so you can design the pages before you have sold anything. Reset to the default design (in the builder) brings a template back to the built-in layout.

Orders

Orders lists paid orders, newest first. A number in the menu counts new ones you have not opened yet. Click an order to see the buyer, the products, the shipping address and the buyer's note.

Status Meaning
Paid ("To send") Payment received. Ship it, then click Mark as sent.
Sent You have shipped it.
Refunded You returned the money.
Cancelled The order was never paid.
Unpaid The buyer started the checkout but has not paid (yet). Shown only under the Unpaid tab; after 7 days they are deleted automatically.

Refunds. Make the refund in Stripe or PayPal itself. Then click Mark as refunded here: it records it and switches the buyer's download links off. Stock is not put back automatically.

Good to know

Troubleshooting

Problem What to check
The code is "for another address" Set the correct site address in Settings → General, then open the E-shop section again.
I cannot save the payment keys The server needs the SETTINGS_KEY setting (see above).
Orders stay Unpaid after paying The Stripe webhook is missing or its signing secret is wrong. Opening the order page asks Stripe once more, but fix the webhook.
The checkout says the payment could not be started The keys are wrong, or you mixed test and live keys. The server log has the reason.
I see no Shop menu The shop is off, or you are signed in as an author (authors do not manage the shop).