Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 30ac023a4f
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (97 sloc) 4.463 kB
header.jumbotron
div.row
div.span3
div.well
h3 Check out the route
hr(style="margin:2px 0 7px")
p The controller in this demo app fetches the newest 5 orders and 5 products. It makes them available as local
variables
code orders
|and
code products
ul
li
i.icon-ok
a(href="http://www.shopify.com/developers/api/", target="blank") API documentation:
span.note Learn what you can do with the Shopify API
br
li
i.icon-ok
a(href="http://twitter.github.com/bootstrap/", target="blank") Bootstrap documentation:
span.note Find out what you can do with Twitter Bootstrap
br
li
i.icon-ok
a(href="http://wiki.shopify.com/", target="blank") Wiki:
span.note Get more information and share your knowledge
br
li
i.icon-ok
a(href="http://forums.shopify.com/community", target="blank") Forum:
span.note Ask questions and see what others already wanted to know
hr
div.span8.offset1
h2 Recent Orders
- if (typeof(orders[0]) == 'undefined')
table.table.table-striped
tr
td
em Glups, you don't have any orders yet!
- else
table.table.table-striped
thead
tr
th Order
th Placed by
th Payment status
th Fulfillment
th Total
- each order in orders
tr
td
a(href="##{order.id}", target="blank")= order.name
td= order.billing_address.name
td
- if( order.financial_status == 'paid' )
span.label.label-success Paid
- else if(order.financial_status == 'pending')
span.label.label-warning Pending
- else
span.label.label-important = other financial status
td
- if(!order.fulfillment_status)
span.label Not Fulfilled
- else
span.label.label-success Fulfilled
td #{order.total_price} #{order.currency}
br
h2 New Products
div.accordion#accordion
- if (typeof(products[0]) == 'undefined')
div.accordion-group
div.accordion-heading
em Glups, you don't have any product to be shown!
- else
- each product, i in products
div.accordion-group
div.accordion-heading
a.accordion-toggle(data-toggle="collapse", data-parent="#accordion", href="##{product.id}")
|#{product.title}
span.pull-right.muted #{product.price_range}
div(id="#{product.id}", class="accordion-body collapse")
div.accordion-inner
- if(product.images)
- if(product.images.first)
div.polaroid
a(href="#modal-#{product.id}", data-toggle="modal")
img(src="#{product.images.first.medium}")
p
strong Type:
| #{product.product_type}
p !{product.body_html}
br
div(id="#modal-#{product.id}", class="modal hide fade", style="display:none")
div.modal-header
a.close(data-dismiss="modal") ×
h3=product.title
div.modal-body
Jump to Line
Something went wrong with that request. Please try again.