diff --git a/app/views/spree/shared/_line_item_name.html.haml b/app/views/spree/shared/_line_item_name.html.haml index 8b1e75de55..4d732055d2 100644 --- a/app/views/spree/shared/_line_item_name.html.haml +++ b/app/views/spree/shared/_line_item_name.html.haml @@ -2,5 +2,5 @@ = "#{line_item.product.name}" - unless line_item.product.name.include? line_item.name_to_display %span= "- #{line_item.name_to_display}" -- if line_item.options_text - = "(#{line_item.options_text})" +- if line_item.unit_to_display + = "(#{line_item.unit_to_display})" diff --git a/lib/reporting/reports/orders_and_distributors/base.rb b/lib/reporting/reports/orders_and_distributors/base.rb index 4b695d33d1..47a389de41 100644 --- a/lib/reporting/reports/orders_and_distributors/base.rb +++ b/lib/reporting/reports/orders_and_distributors/base.rb @@ -15,7 +15,7 @@ module Reporting customer_city: proc { |line_item| line_item.order.bill_address.city }, sku: proc { |line_item| line_item.product.sku }, item_name: proc { |line_item| line_item.product.name }, - variant: proc { |line_item| line_item.options_text }, + variant: proc { |line_item| line_item.unit_to_display }, quantity: proc { |line_item| line_item.quantity }, max_quantity: proc { |line_item| line_item.max_quantity }, cost: proc { |line_item| line_item.price * line_item.quantity }, diff --git a/spec/lib/reports/orders_and_distributors_report_spec.rb b/spec/lib/reports/orders_and_distributors_report_spec.rb index 1b31eb68f9..3edccd5ff6 100644 --- a/spec/lib/reports/orders_and_distributors_report_spec.rb +++ b/spec/lib/reports/orders_and_distributors_report_spec.rb @@ -60,7 +60,7 @@ RSpec.describe Reporting::Reports::OrdersAndDistributors::Base do bill_address.city, line_item.product.sku, line_item.product.name, - line_item.options_text, + line_item.unit_to_display, line_item.quantity, line_item.max_quantity, line_item.price * line_item.quantity,