Monday, February 11, 2013

Gift Wrap [a coding post]

Platform: Shopify

Problem: Client wants customers to be able to add gift wrap to their orders from the cart page, they want to charge for the gift wrap option, and they want to make the option available on a per-cart item basis.

Proposed Solution: Create a second, hidden form on the cart page (not nested) with "cart/add" action and a single input fields, with the value of a gift wrap product. A checkbox in the primary cart form calls a javascript function to submit the second form and add gift wrap to the cart.