Add an order form to your store

Caution

This document has not been verified to work with sectioned themes. We are currently reviewing our documentation and will update them soon. You can try to implement this on your theme, but keep in mind that it may not function.

So, you would like to list products that belong to a collection inside a table, one product per row with a quantity box. You want your customers to be able to add to the cart all products in that table that don't have their quantity box set to zero with one click on a single button.

Order form

You may want to add your order form to a regular page, e.g. at /pages/order-form, or you may prefer to transform an existing collection page, e.g. your Wholesale collection that lives at /collections/wholesale, into an order form. To use a page, skip to the “Add an order form to a regular page” section to get started. If you'd rather use a collection page, skip to the “Add an order form to a collection page” section.

Add an order form to a regular page

  1. Find the theme you want to edit, click Actions, and then click Edit HTML/CSS.

  2. On the left side, under Templates, click Add a new template. Create a new template for 'page' called 'order-form':

    Order form page template

  3. Replace the content of your new page.order-form.liquid template with the content of this gist.

  4. Choose which collection to use in your order form. Do you want all products in your shop to be listed? Create a collection with handle all as per these instructions. Once you have decided which collection to use, take note of its handle, and at the very top of your template, add this line of code:

    
    {% assign collection = collections.your-collection-handle-here %}
    
    

    Replace the your-collection-handle-here bit with your collection handle.

    Then save.

  5. Create a new page under Pages.

  6. After you created your page, scroll all the way down to the Template section, and select “page.order-form” in the drop-down. Then save your page.

    Order form page template 2

  7. You are done. Go to your page on your store's front to test things out.

Add an order form to a collection page

  1. Find the theme you want to edit, click Actions, and then click Edit HTML/CSS.

  2. On the left side, under Templates, click Add a new template. Create a new template for 'collection' called 'order-form':

    Order form collection template

  3. Replace the content of your new collection.order-form.liquid template with the content of this gist.

  4. Choose which collection to use in your order form. Do you want all products in your shop to be listed? Create a collection with handle all as per these instructions.

  5. Once you have decided which collection to use, browse to that collection in your store's admin, then scroll all the way down to the Template section, and select “collection.order-form” in the drop-down. Save your collection.

    Order form collection template 2

  6. You are done. Go to your collection page on your store's front to test things out.

Demo shop

See our demo page here.

Want to discuss this page?

Visit the Shopify Community