From f7f4fbf503d6d732f0365ec64af33c56f0e08644 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 17 Jan 2014 15:17:30 +1100 Subject: [PATCH] Displaying prices better --- app/views/shop/_products.html.haml | 4 ++-- app/views/shop/products.rabl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/shop/_products.html.haml b/app/views/shop/_products.html.haml index 282bfc0ce0..9639e5a217 100644 --- a/app/views/shop/_products.html.haml +++ b/app/views/shop/_products.html.haml @@ -36,7 +36,7 @@ %span.light-grey{"ng-hide" => "product.group_buy"} N/A %td.price - %small from + %small{"ng-show" => "(product.variants.length > 0)"} from ${{ product.price }} %tr{"ng-repeat" => "variant in product.variants"} %td{colspan: 3} @@ -53,7 +53,7 @@ %span.light-grey{"ng-hide" => "product.group_buy"} N/A %td.price - %small from ${{variant.price }} + %small ${{variant.price }} %input.button.right{type: :submit, value: "Check Out"} -#%pre {{ data.products | json }} diff --git a/app/views/shop/products.rabl b/app/views/shop/products.rabl index 12eda5d892..ae07bc410e 100644 --- a/app/views/shop/products.rabl +++ b/app/views/shop/products.rabl @@ -16,7 +16,7 @@ child :master => :master do end child :variants => :variants do |variant| - attributes :id, :is_master, :count_on_hand, :options_text, :count_on_hand, :on_demand + attributes :id, :is_master, :price, :count_on_hand, :options_text, :count_on_hand, :on_demand child :images => :images do attributes :id, :alt node do |img|