For OpenCart 2.3, 3.0, 4.0 and 4.1
Fields you define
- Text (with a longest length), Choice from a list (each choice with its own extra price, for example "Gold|5"), or Picture upload.
- An extra price per item for text and picture fields.
- Required or optional, active or switched off, and a sort order.
- Each field applies to every product, to the product IDs you list, or to every product in the category IDs you list. Several fields can apply to one product.
What the customer sees
- A "Personalise your item" box inside the add-to-cart area of the product page, with the price of each option shown.
- Required fields stop the Add to cart button until they are filled in.
- Pictures are uploaded as soon as they are chosen (JPG, PNG, GIF or WebP, up to the size you set).
- The cart page lists every personalisation with its price, and the checkout total gets its own "Personalisation" line (extra price x quantity).
- The same product with a different personalisation is its own cart line.
What you see
- The admin order page shows, for every order line, what was written, chosen or uploaded and what it cost, with a link to download the customer's picture.
- Fields can be edited or deleted any time; orders already placed keep their personalisation.
Safety
- Everything is checked again on the server against your fields: text too long, a choice that is not on your list or a picture that was not uploaded earns no price and is not stored, however the request was made.
- Uploaded files are checked as real pictures, given a random name and kept in a protected folder; ten uploads per visitor and hour. Pictures are only served to signed-in admins, and only when an order carries them.
Notes
- Required fields are enforced by the product page. If someone bypasses the page, the cart shows "Please fill in: ..." for that line, but the server does not refuse the order.
- The extra price is added to the order total without tax.
- The personalisation appears in the cart summary box, the totals and the admin order page. It is not printed on the order e-mail beyond the "Personalisation" price line.
- Fields and the personalisation of placed orders are kept if you uninstall the module; settings, event hooks and the total line are removed. Uploaded pictures stay in your storage folder (system/storage/upload/afc) until you delete them.
- Every storefront text is in one language file you can copy and translate. No core files are edited.