From bf4d83aecc3ceb50682e3a60c62d8924b7991c4e Mon Sep 17 00:00:00 2001 From: Rob H Date: Fri, 30 May 2014 18:39:41 +1000 Subject: [PATCH] Fix master options_text display on front end --- app/models/spree/product_decorator.rb | 2 +- app/views/shop/products/_master.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/spree/product_decorator.rb b/app/models/spree/product_decorator.rb index 36473d4e24..ea986cd64e 100644 --- a/app/models/spree/product_decorator.rb +++ b/app/models/spree/product_decorator.rb @@ -155,7 +155,7 @@ Spree::Product.class_eval do end def update_units - if variant_unit_changed? + if variant_unit_changed? && !variant_unit_change.first.nil? option_types.delete self.class.all_variant_unit_option_types option_types << variant_unit_option_type if variant_unit.present? variants_including_master.each { |v| v.delete_unit_option_values } diff --git a/app/views/shop/products/_master.html.haml b/app/views/shop/products/_master.html.haml index bd8a8cd3de..e8972082dd 100644 --- a/app/views/shop/products/_master.html.haml +++ b/app/views/shop/products/_master.html.haml @@ -3,7 +3,7 @@   .small-4.columns - ({{ product.master.options_text }}) + {{ product.master.options_text }} -# WITHOUT GROUP BUY .small-5.columns{"bo-if" => "!product.group_buy"}