Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Enhance the display of the product properties on storefront (#12828)
Devin Zhangedbea62ee985
diff --git a/storefront/app/helpers/spree/products_helper.rb b/storefront/app/helpers/spree/products_helper.rbindex 25acc2ab54..de4eec8073 100644--- a/storefront/app/helpers/spree/products_helper.rb+++ b/storefront/app/helpers/spree/products_helper.rb@@ -213,5 +213,9 @@ module SpreeSpree::ColorsPreviewStylesPresenter.new(option_type.option_values.map { |ov| { name: ov.name, filter_name: ov.name } }).to_send++ def product_properties(product)+ product.product_properties.joins(:property).merge(Spree::Property.available_on_front_end).sort_by_property_position+ endendenddiff --git a/storefront/app/views/themes/default/spree/products/_details.html.erb b/storefront/app/views/themes/default/spree/products/_details.html.erbindex 047bafe7dc..3ddba37a8f 100644--- a/storefront/app/views/themes/default/spree/products/_details.html.erb+++ b/storefront/app/views/themes/default/spree/products/_details.html.erb@@ -39,7 +39,7 @@</div><% end %>- <% product.product_properties.joins(:property).merge(Spree::Property.available_on_front_end).sort_by_property_position.each do |product_property| %>+ <% product_properties(product).each do |product_property| %><div class="product-property py-4 border-b border-default"><%= link_to "#property_#{product_property.id}", class: 'text-sm uppercase tracking-widest inline-flex w-full justify-between !border-b-transparent', data: { action: 'accordion#toggle' } do %>