1. What this module does

Let B2B customers add dozens of products to the cart by reference or EAN in seconds. The module adds a Quick order page to your shop. The customer types references or EAN codes with quantities in rows, pastes lines copied from a spreadsheet or uploads a CSV file, and clicks Check. A preview shows every line with the product, its variant, picture, the customer's own price and availability, and a clear message for each problem. One click on Add to cart then puts every line that can be ordered into the cart, through PrestaShop's own cart. You decide which customer groups may use the page.

The module does not create orders: the cart and the checkout stay PrestaShop's. It does not search products by name, it does not save lists for later, and it keeps neither the uploaded file nor the lists.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. Download the module from My account → Order history at addonspresta.com.
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the ap_quickorder_v1.0.0.zip file and wait for the confirmation.
  4. Click Configure on the module card.

If you have shell access, you can also unpack the zip into modules/ and run php bin/console prestashop:module install ap_quickorder from the shop folder.

Right after the installation the page is open to every visitor, guests included, because no customer group is chosen yet. Its address is /en/quick-order in English (/quick-order when English is the default language of a PrestaShop 9 shop that leaves it out of its addresses, see section 3) and a translated address in the other languages of your shop, every customer who may use it finds a Quick order link on the My account page, and the link in the header is off. To keep the page for your wholesale customers:

  1. Open Modules → Module Manager → Quick Order by SKU → Configure.
  2. Under Customer groups, tick the group of your wholesale customers (create it first in Shop Parameters → Customer Settings → Groups if you do not have one), and click Save.
  3. Open the page in a private window: a visitor who is not logged in is now sent to the login page.

3. How it works

The quick order page

The page has its own address in every language of the shop: quick-order after the language by default, for example https://www.example.com/en/quick-order. PrestaShop 9 can leave the default language of the shop out of its addresses (Use prefix for default language off, in Shop Parameters → Traffic & SEO): the page in that language is then at https://www.example.com/quick-order, without /en/. The address is a setting (Page address, section 4), and the page is also listed in Shop Parameters → Traffic & SEO like PrestaShop's own pages, where its meta title and meta description live. Without friendly URLs the page answers at index.php?fc=module&module=ap_quickorder&controller=quickorder. The Help box of the configuration page lists the address of the page in every language.

The page always asks search engines not to index it (noindex, nofollow): it shows the prices and the cart of one customer, so it has nothing to offer in search results. It uses your theme's page layout, with the breadcrumb, the title ("Quick order", or your Page title) and a short introduction above the form.

Links to the page.

  • My account — a "Quick order" entry on the customer's account page (a tile on Classic, an entry of the account menu on Hummingbird). It is always there for visitors who may use the page.
  • Header — a "Quick order" link with an icon next to the cart and account links, when Link in the header is on. Both themes show that part of the header only from the tablet width up, so on a phone the way in is the My account link (or your own link to the page address, for example in a menu or a CMS page).

Both links are shown only to visitors who may use the page.

Who may use the page

The setting Customer groups decides it:

  • Nothing ticked: every visitor may use the page, also visitors without an account and guests.
  • One or more groups ticked: only visitors who belong to at least one of them. A customer can belong to several groups; all of them count, not only the default group. A visitor who is not logged in is in PrestaShop's Visitor group, a customer who ordered without an account is in the Guest group.

What a visitor without access gets:

  • a visitor who is not logged in is sent to the login page and comes back to the quick order page after logging in;
  • a logged-in customer outside the ticked groups gets your theme's "page not found" page, as if the page did not exist; the links are hidden for them.

The page also answers "page not found" to everybody when Enable the quick order page is off, when the shop is in catalogue mode, or when the visitor's group does not see prices (Shop Parameters → Customer Settings → Groups, "Show prices" off), because PrestaShop treats that group as catalogue mode.

Limiting the page to groups also works when Customer groups are switched off in PrestaShop (Advanced Parameters → Performance → Optional features): a visitor who is not logged in belongs to the Visitor group, a customer to the groups stored for them. A page limited to some groups therefore still needs a login.

Three ways to enter the list

The customer can use all three at once; the lines are read in this order: the rows, the pasted lines, the file. Empty rows and empty lines are skipped and do not count.

1. Rows. The form starts with 5 rows "Reference or EAN" and "Quantity". Add a row adds one more row (without JavaScript the button reads More rows and adds 5 rows, keeping what was typed). A row without a quantity orders one piece. Example:

AB-1001        10
5901234123457  (empty: 1 piece)

2. Paste lines from a spreadsheet. The customer copies two columns from Excel, LibreOffice or Google Sheets and pastes them into the box. One product per line: the code, then the quantity, separated by a tab (what a spreadsheet copies), a semicolon, a comma or a space. Without a quantity, one piece is ordered. When the quantity of the first line contains letters, that line is a column heading and is skipped. Example:

Reference;Quantity
AB-1001;10
AB-1002 4
5901234123457
CD-77 2

This reads AB-1001 × 10, AB-1002 × 4, the EAN 5901234123457 × 1 and CD-77 × 2. A code that contains spaces needs a tab or a semicolon after it. Columns after the second are ignored. The box takes up to 256 kB of text; more is refused with "The pasted text is too long. Paste fewer lines at once."

3. Upload a CSV file. The same format as the pasted lines: first column the code, second column the quantity, other columns ignored, a heading row skipped. Example of a file saved from a spreadsheet:

code,quantity
AB-1001,10
AB-1002,4
"CD-77",2

The file can be up to Largest CSV file (kB) (256 kB by default) and never larger than the server accepts. It must be a text file: a file in UTF-8 is read as it is (a BOM is removed); any other file is read as Windows-1252, the encoding Excel uses for "CSV" in western Europe. Codes are usually plain letters and digits and read the same either way; codes with accented letters need a file saved as "CSV UTF-8". The file is read in memory and never stored: not on the server, not in the database.

One maximum for all three. The setting Maximum lines (200 by default, never more than 200) counts the rows, the pasted lines and the lines of the file together. Lines beyond it are not read, and the preview says so: "Only the first 200 lines were read. Lines left out: 5. Add them after these." Nothing is lost silently.

Duplicated codes are merged. Lines with the same code (upper or lower case does not matter) become one line with the quantities added up, and so do lines whose codes lead to the same product or variant. The merged line says "Lines merged into this one: N."

How codes are found

  • A code matches exactly, upper and lower case do not matter, accents count, spaces around it are removed. There are no wildcards and no search by part of a code or by name. A code can have up to 64 characters; a longer one is reported as not found.
  • The code is compared with the fields ticked in Codes searched: Reference and EAN-13 or GTIN barcode by default, optionally UPC barcode, ISBN and MPN. Products and their combinations (variants) are both searched; a code of a combination finds that combination.
  • Only products of this shop that the visitor may see are found: the product is active in the shop and one of its categories is open to the visitor's customer groups, as on the product page.
  • A product whose visibility is "Nowhere" (hidden from the catalogue and search) can still be ordered by its exact code, as it can be ordered through its direct link.
  • An inactive product, a product of another shop, or a product whose categories are closed to the visitor's groups answers "No product with this code." — exactly like an unknown code, so the page never tells that such a product exists.

The preview

Check shows the list as a table: picture, product name and variant, the code as typed, unit price, quantity (it can be changed), line total, availability and the message of the line. Each line has one of these results:

  • Ready — no message; the availability under the name is the product's or the shop's label for products in stock, or "In stock" (or the label for back-orders, or "Available on backorder", when the stock does not cover the quantity and back-orders are allowed). Shown only when stock management is on.
  • Not found — "No product with this code."
  • Choose a variant — the code is the code of a product with combinations: "Choose a variant, then check the list again." with a list of its variants (up to 50). A product with more variants says "This product has many variants: type the code of the variant, or choose it on the product page." with an Open the product page link.
  • Several products — the same code belongs to several products: "Several products have this code. Choose one, then check the list again." with a list of up to 10 of them (name, variant and reference, never a price); when there are more, a note gives their number.
  • Cannot be ordered — products whose price is hidden ("Show price" off) or that are not available for order ("Available for order" off) cannot be ordered from the quick order page: the page shows "This product cannot be ordered online." and no price, as the product page does. A product with "Show price" off is never priced or orderable here: the line has no price and no total, does not count in the summary and is never added to the cart, also on PrestaShop 1.7.8 (PrestaShop 8 and 9 disable their own Add to cart button for such products too).
  • Sold out — "Out of stock." when stock management is on and back-orders are denied.
  • Not enough stock — "Not enough stock: N available.", where N is the stock minus what the customer's cart already holds. When a customer asks for more than the stock and back-orders are not allowed, the page shows the exact quantity still available ("Not enough stock: 3 available."), as PrestaShop's own cart does.
  • Below the minimum — "The minimum quantity is N." for a product or variant with a minimum quantity (minus what the cart already holds).
  • Needs personalisation — "This product needs your personalisation: order it on its page." with an Open the product page link, for a product with a required customization field.
  • Invalid quantity — "Enter a whole number from 1 to 99,999."

Prices. The unit price is the customer's own price — group price, specific prices and catalogue price rules included — for the quantity of the line (at least the minimum quantity), with the shop's tax display; the column heading carries the theme's tax label "(tax incl.)" or "(tax excl.)" when the theme shows one. A line total is shown for ready lines only. Lines that cannot be ordered get no amount at all: the preview is not a price list. The cart can differ when it already holds the same product, because volume discounts count the whole cart line, and vouchers and cart rules are applied in the cart.

Summary and actions. Below the table: "Lines ready: N · Pieces: N · Total: amount" with the tax label, then three empty rows Add more products, the buttons Check again and Add to cart (N), and the link Start a new list. The customer can correct a quantity, choose a variant or a product in the lists, tick Remove to take a line out, add more codes and click Check again. Every line is looked up and checked again at each step; nothing is kept on the server between the steps.

Adding to the cart

Add to cart (N) sends every ready line in one request. Each line goes into the cart through PrestaShop's own cart function, so PrestaShop checks stock and minimum quantities again and other modules' cart rules apply as with the theme's own button — for example Quantity Limits and Order Amount Limits judge the cart afterwards, and automatic cart rules are refreshed once at the end. Then:

  • The page shows "Added to your cart — lines: N, pieces: N." with a View cart link, and the theme's cart preview in the header is refreshed. The theme's "added to cart" pop-up does not open: it can show only one product.
  • Added lines leave the list. A line that could not be added stays with its message ("The minimum quantity is N." or "This product could not be added to the cart."); a quantity is never reduced silently.
  • When everything was added, the empty form is shown again for the next list.

Very large lists. The adding works for at most 15 seconds per click, or for half of the server's PHP time limit (max_execution_time) when that is shorter, but never less than 2 seconds; it also stops once it has used a quarter of the memory PHP had free for the request. Lines it did not reach are not added yet: they stay in the form with "Not added yet: click the button below to add the remaining lines.", the note "The shop adds large lists in parts. Click the button until every line is in your cart." and the button Add the remaining lines to cart (N). This happens only with very large lists on a slow server; on the test shops 200 lines went into an empty cart in one click of 3 to 6 seconds.

Nothing is added twice. The preview remembers the state of the cart when it was shown. If the cart changed since then — the form was sent twice, the page was reloaded after an add, or the cart was changed in another tab — nothing is added and the list is shown checked again with "Your cart changed since the list was checked. Check the list below and add it again."

What the page reveals: a public lookup

With no group ticked, anyone can check whether a code exists and read its public price and availability, up to the maximum lines per request. It is the same data the catalogue shows on the product pages, but in bulk, without browsing.

The quick order page is a public lookup: by default every visitor, also one who is not logged in, can check up to the maximum number of codes at once and see the name, variant, picture, price and stock of every product they may see in your shop — also products whose visibility is "Nowhere", which can be found by their code. If your references or EANs must not be probed, tick only your customer groups under Access: visitors who are not logged in are then sent to the login page.

Inactive products, products of other shops and products closed to the visitor's groups stay invisible ("No product with this code."), and products with "Show price" off are never priced. The message "Not enough stock: N available." tells the exact stock of a product, as PrestaShop's own cart does.

Performance on large catalogues

Only the reference has a database index. Each ticked EAN-13, UPC, ISBN or MPN field makes a check read the whole product and combination tables (EAN-13 and UPC for codes made of digits, ISBN for ISBN-shaped codes, MPN for every code). On a large catalogue tick only the codes your customers use, leave MPN off, and consider limiting the page to customer groups. That is why MPN is off after the installation. A reference costs one quick index lookup, whatever the size of the catalogue. The module never adds indexes to PrestaShop's tables.

Without JavaScript and on a phone

The page works without JavaScript: every button sends the form and the shop answers with the next page. With JavaScript, Check and Add to cart answer without reloading the page and the cart preview in the header is updated. If the shop sends no usable answer (a server error or time limit), the page says "The shop did not answer. Check your cart before you add the list again." — some lines may already be in the cart.

On a phone each line of the preview becomes a card; the page never scrolls sideways. Classic and Hummingbird both work.

Personal data, connections, e-mails

Nothing is stored: no lists, no uploaded files, no database table of the module. The module keeps only its settings and the address of its page. It stores no personal data, sets no cookie of its own (a new cart goes into PrestaShop's cookie, as with the theme's own button) and uses no browser storage. It makes no outgoing connection — no licence check, no statistics, nothing to addonspresta.com or any other server. It has no cron job and sends no e-mails.

Caches. The page tells browsers and proxies not to keep it. PrestaShop does not cache the page or the links, so saving the settings needs no cache clearing. A full-page cache in front of the shop (a cache module, Varnish, a CDN that caches HTML) must leave this page out, as any page with customer prices and a cart. If you use a full-page cache module, exclude the quick order page from it.

Failures. If something fails while the list is checked, the page says "The list could not be checked. Try again in a moment." and one line at most per hour is written to Advanced Parameters → Logs, starting with "Quick Order by SKU:".

4. Features and settings

Open Modules → Module Manager → Quick Order by SKU → Configure. The Help box at the top links this manual and the module page at addonspresta.com in the language of your Back Office, gives our support address and shows the installed version; below that it lists the address of the quick order page in every language. Then come three panels, Access, Order form and Page. Each has a Save button, and each one saves all three panels; "Settings saved." confirms it. When a value is wrong, nothing is saved and the form shows the message above your values.

Access

Enable the quick order page

On after the installation. "Off: the page answers "not found" and no link to it is shown." The settings stay.

Customer groups

The customer groups of the shop, Visitor, Guest and Customer included; tick the groups that may use the page. "Nothing ticked: every visitor may use the page, also without an account. Otherwise only visitors who belong to at least one ticked group. Visitors who are not logged in are in the Visitor group, guest checkouts in the Guest group; when they may not use the page they are sent to the login page." The line Ticked: above the list repeats your choice.

Unticking every group would open the page to every visitor, so that save is refused with "No customer group would be left in the list, so every visitor could use the page. Tick at least one group, or tick the confirmation under the list to open the page to every visitor." Tick Yes, open the page to every visitor. and save again if that is what you want. A group deleted from the shop stays in the list with its number, for example "#12 (not in this shop any more)", ticked, until you untick it.

Order form

Codes searched

Reference, EAN-13 or GTIN barcode, UPC barcode, ISBN and MPN; at least one. Reference and EAN-13 are ticked after the installation. "A code typed by the customer is compared with these fields of the products and of their combinations. Codes match exactly; upper and lower case do not matter." The second help line gives the cost: "Only the reference has a database index. Each other field makes a check read the whole product and combination tables: EAN-13 and UPC only for codes made of digits, ISBN for digits with X and hyphens, MPN for every code. On a large catalogue tick only the codes your customers use and leave MPN off." See "Performance on large catalogues" in section 3.

Maximum lines

"From 10 to 200. One limit for the rows, the pasted lines and the CSV file together." Default 200. The form never offers more rows than this number.

CSV file upload

On after the installation. "Lets customers upload a CSV file with one product per line: the code, then the quantity. The file is only read, never saved." Off: the form has no file field, and a file sent anyway is ignored.

Largest CSV file (kB)

"From 16 to 1024 kB, used when the upload is on. The server also limits uploads (upload_max_filesize: …, post_max_size: …): the smallest limit applies." Default 256. The help shows your server's two limits; a larger file is refused with "The file is larger than N kB. Upload a smaller file." 256 kB is far more than 200 lines need.

Link in the header

Off after the installation. "A "Quick order" link next to the cart in the header (hook displayNav2). The link on the My account page is always shown. Both only to visitors who may use the page." Both themes hide that part of the header on phones.

Page

Page title

One field per language, up to 100 characters of plain text (the characters < and > are refused). "Leave empty to show "Quick order", translated into the language of the visitor." The title is also the last step of the breadcrumb.

Introduction

One field per language. "Plain text above the form, up to 600 characters. Leave empty to show a short explanation of the form in the language of the visitor." Line breaks are kept. The default text reads "Type the reference or EAN code of each product and its quantity, paste lines from a spreadsheet or upload a CSV file. Check the list, then add it to your cart."

Page address

One field per language. "The part of the address after the language, for example quick-order. Also editable in Shop Parameters > Traffic & SEO, with the meta title and description of the page. Search engines are always asked not to index the page." What you type is saved as an address: lower case, spaces turned into hyphens, up to 128 characters. It is required in the default language; a language left empty uses the address of the default language. An address used by another page of the shop in the same language is refused ("This page address is already used by another page of the shop: …"), also when it comes from the default language. The address is used when friendly URLs are on.

At the installation every language gets an address made from the translated page name — quick-order in English, szybkie-zamowienie, commande-rapide, schnellbestellung, pedido-rapido and ordine-rapido in Polish, French, German, Spanish and Italian, quick-order in other languages — together with a meta title and a meta description in Shop Parameters → Traffic & SEO.

5. Multistore

Settings are saved for the shop or shop group selected in the Back Office header. Values saved with All shops apply to every shop that has no value of its own. A save in the All shops context does not replace values that a shop saved in its own context: settings saved for All shops or a shop group do not change a shop whose settings were saved in its own context; select that shop to change them. In that context the Access panel says so: "These settings are saved for every shop of the context that has no settings of its own. A shop whose settings were saved in its own context keeps them: select that shop in the header to change them." In the All shops or a group context only an employee who manages every shop of that context can save. The list of groups is that of the shops of the context you manage.

The page address is saved for the shops of the selected context. On the storefront each shop finds only its own products and combinations, with its own prices, pictures and stock; a shop group that shares its stock is read as PrestaShop reads it. One licence covers every shop of the installation.

6. Uninstall

Module Manager → Quick Order by SKU → Uninstall deletes every setting of the module in every shop and the quick order page from Shop Parameters → Traffic & SEO. The module keeps no lists, files or tables, so nothing else is removed; carts that customers filled with the page stay ordinary PrestaShop carts.

Disable keeps the settings: while the module is disabled the page answers "page not found" and no link is shown. Switching off Enable the quick order page has the same effect for one shop.

7. FAQ and troubleshooting

The page answers "page not found". Check that the module is enabled and Enable the quick order page is on for this shop; that the shop is not in catalogue mode and the customer's group sees prices; and, when groups are ticked, that the logged-in customer belongs to one of them. A visitor who is not logged in is sent to the login page instead. Check also the address in Page address (or the list in the Help box) and that friendly URLs are on.

A code is reported as "No product with this code." although the product exists. The product is inactive in this shop, belongs to another shop, or its categories are closed to the customer's groups; the code has a typo; or the field that holds this code is not ticked in Codes searched (for example a UPC code while only Reference and EAN-13 are ticked). Codes must match exactly: "AB-1001" does not find "AB1001".

A line says "This product cannot be ordered online." The product's Available for order option or its Show price option is off (Catalog → Products, the product's options). Such products are never priced or added from the quick order page.

The CSV file shows strange characters in the codes. The file was not saved in UTF-8 and the codes contain accented letters. Save it from the spreadsheet as "CSV UTF-8" and upload it again. Codes made of plain letters and digits are read correctly in either encoding.

Some lines were left out. The list had more lines than Maximum lines (200 at most), counting the rows, the pasted lines and the file together. The message gives the number left out: check the list, add it, then enter the remaining lines.

The cart did not get every line. Each line was checked again when it was added: the stock may have changed, a minimum quantity may apply, or another module refused the line in the cart (for example a module that limits quantities); the message of the line says which. With a very large list on a slow server, the lines not reached within the time of one click stay as "Not added yet": click Add the remaining lines to cart (N) until the list is empty.

The message "Your cart changed since the list was checked." appears. The cart was changed after the preview was shown — the form was sent twice, the page was reloaded after an add, or the cart was changed in another tab. Nothing was added: check the list below the message and add it again.

The message "The page has expired. Check your list again." appears. The page was open for a long time, or the customer logged in or out in another tab, and the security token no longer matches. Enter the list again and click Check.

The message "The shop did not answer." appears after Add to cart. The server did not send a usable answer (an error, or a time limit of the server or of a proxy). Some lines may already be in the cart: open the cart before you add the list again. If it happens often, ask your host to check the error log and the PHP time limit.

The header link is missing on phones. Classic and Hummingbird show that part of the header only from the tablet width up. On a phone customers reach the page through My account, or through a link you add to a menu or a CMS page.

Can customers search by product name or save their lists? No. The page finds products by their exact codes only, and nothing is saved between two visits: customers keep their lists in their own spreadsheet and paste or upload them again.

A text of the module is still in English in my shop or my Back Office. The page title and the introduction are settings per language in the Page panel. The other texts are translated in International → Translations → Installed module translations: select the module and your language.

Can I change how the page looks? Yes, from your theme, so your changes survive updates: the README.md file in the module zip, section "Customising", lists the template blocks, CSS classes and the JavaScript event you can use.

8. Updates and support

Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings are kept.

Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.

Back to User manuals

Loading...
Back to top