Directing our form to the order populator

This commit is contained in:
Will Marshall
2013-12-18 15:17:08 +11:00
parent 4b7605212e
commit 21d99c8e56
3 changed files with 9 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ shop
font-size: 1.29em
padding-right: 14px
.custom.dropdown
width: 250px
width: 280px
display: inline-block
background: transparent
border-width: 2px
@@ -59,6 +59,8 @@ shop
border: none
th
line-height: 50px
.notes
max-width: 300px
td, th
background: #fff
border: 1px solid #cccccc

View File

@@ -1,6 +1,6 @@
module Spree
class ProductSerializer < ActiveModel::Serializer
attributes :id, :name, :description, :price
attributes :id, :name, :description, :price, :permalink
has_one :master
has_one :supplier
has_many :variants

View File

@@ -1,10 +1,10 @@
%products{"ng-controller" => "ProductsCtrl"}
%form.custom
= form_for :order, :url => populate_orders_path, :class => "custom" do
%input.button.right{type: :submit, value: "Check Out"}
%table
%thead
%th{colspan: 2} Item
%th Notes
%th.notes Notes
%th Variant
%th QTY
%th Bulk
@@ -18,7 +18,7 @@
%h5
{{ product.name }}
{{ product.supplier.name }}
%td {{ product.description | truncate:250 }}
%td.notes {{ product.description | truncate:250 }}
%td {{ product.master.options_text }}
%td
%input{type: :number, value: 0, min: 0, name: "quantity_variant_{{product.master.id}}"}
@@ -29,7 +29,7 @@
Not available
%td.price
%small from
$ {{ product.price }}
${{ product.price }}
%tr{"ng-repeat" => "variant in product.variants"}
%td{colspan: 3}
%td {{variant.options_text}}
@@ -41,7 +41,6 @@
%span{"ng-hide" => "product.group_buy"}
Not available
%td.price
%small from
${{ variant.price }}
%small from ${{variant.price }}
%input.button.right{type: :submit, value: "Check Out"}
-#%pre {{ data.products | json }}