Asking your customer for additional information

From Spiffy Stores Knowledge Base

Revision as of 09:37, 12 September 2008 by Admin (talk | contribs)

When you update the content of a cart or click the checkout button on a standard cart.liquid page, the store code will look for two special parameters called note and attributes

Adding a Text Note

The note parameter is the easiest to use. You can use this to add a free-form text note to the cart before checkout.

For example, if you are running a gift shop, you may want to ask your customers for a gift message to be included in the package.

Add following html/liquid code to your cart.liquid before the </form> tag:

<p>
<label for="note">Gift note:</label><br/>
  <textarea name="note" id="note" rows="2" cols="60" style="width: 100%">{{cart.note}}</textarea>
</p>

This will produce a cart page that looks something like this:


Cart info1.jpg


After the order has been placed, the note will display at the top of the page when you view the order in the toolbox.


Cart info2.jpg

Cart Attributes

Attributes let you attach any value to an order by choosing a name for it. They are very useful for creating more complex forms with checkboxes, drop-downs or even hidden fields which just attach the browser version or operating system of the client to the order.

You choose the name of the attribute using the html name property in the form "attributes[name]".

<input type="checkbox" name="attributes[wrapping]" id="wrapping" value="yes" />