Skip to content

Instantly share code, notes, and snippets.

@Solnse
Created October 19, 2011 06:08
Show Gist options
  • Save Solnse/1297581 to your computer and use it in GitHub Desktop.
Save Solnse/1297581 to your computer and use it in GitHub Desktop.
_cart.html.haml
.cart_title = t('.title')
%table
= render(cart.line_items)
%tr.total_line
%td{:colspan => "2"} Total
%td.total_cell= number_to_currency(cart.total_price)
= button_to t('.checkout'), new_order_path, method: :get
= button_to t('.empty'), cart, method: :delete, confirm: 'Are you sure?'
en.yml
carts:
title: "Your Cart"
cart:
title: "Your Cart"
empty: "Empty cart"
checkout: "Checkout"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment