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
Making sure we're using spree route helpers
Damian Legawiec3d024db6ac5e
diff --git a/frontend/app/views/spree/orders/_line_item.html.erb b/frontend/app/views/spree/orders/_line_item.html.erbindex 280092ef0e..db453ea9a8 100644--- a/frontend/app/views/spree/orders/_line_item.html.erb+++ b/frontend/app/views/spree/orders/_line_item.html.erb@@ -3,7 +3,7 @@<%= order_form.fields_for :line_items, line_item do |item_form| %><div class="d-table-row shopping-cart-item"><div class="d-table-cell shopping-cart-item-image" data-hook="cart_item_image">- <%= link_to product_image(variant), variant.product %>+ <%= link_to product_image(variant), spree.product_path(variant.product) %></div><div class="d-table-cell shopping-cart-item-description" data-hook="cart_item_description"><h2 class="item-title"><%= link_to line_item.name, spree.product_path(variant.product) %></h2>diff --git a/frontend/app/views/spree/shared/_line_item.html.erb b/frontend/app/views/spree/shared/_line_item.html.erbindex 3a512dec02..40012b311a 100644--- a/frontend/app/views/spree/shared/_line_item.html.erb+++ b/frontend/app/views/spree/shared/_line_item.html.erb@@ -1,9 +1,9 @@<div class="checkout-confirm-order-details-line-items-line-item w-100 d-table-row"><div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4"><div class="d-flex align-items-lg-center">- <%= link_to product_image(line_item.variant), line_item.product %>+ <%= link_to product_image(line_item.variant), spree.product_path(line_item.product) %><div class="d-flex flex-column mt-2 mt-lg-0">- <div><%= link_to line_item.name, line_item.product %></div>+ <div><%= link_to line_item.name, spree.product_path(line_item.product) %></div><ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0"><% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %><li>diff --git a/frontend/app/views/spree/shared/_order_details.html.erb b/frontend/app/views/spree/shared/_order_details.html.erbindex a076017b74..af99eeec0f 100644--- a/frontend/app/views/spree/shared/_order_details.html.erb+++ b/frontend/app/views/spree/shared/_order_details.html.erb@@ -75,11 +75,11 @@<div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4"><div class="d-flex align-items-lg-center"><div class="checkout-confirm-order-details-line-items-line-item-name-image" data-hook="order_item_image">- <%= link_to product_image(item.variant), item.product %>+ <%= link_to product_image(item.variant), spree.product_path(item.product) %></div><div class="d-flex flex-column mt-2 mt-lg-0" data-hook="order_item_description"><div data-hook="order_item_name">- <%= link_to item.name, item.product, class: 'checkout-confirm-order-details-line-items-line-item-name-link' %>+ <%= link_to item.name, spree.product_path(item.product), class: 'checkout-confirm-order-details-line-items-line-item-name-link' %></div><% unless item.variant.is_master? %><ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">diff --git a/frontend/app/views/spree/users/show.html.erb b/frontend/app/views/spree/users/show.html.erbindex d014406baf..3169a6da44 100755--- a/frontend/app/views/spree/users/show.html.erb+++ b/frontend/app/views/spree/users/show.html.erb@@ -57,7 +57,7 @@<tbody><% @orders.each do |order| %><tr>- <td class="account-page-order-number"><%= link_to order.number, order_url(order), class: "text-primary" %></td>+ <td class="account-page-order-number"><%= link_to order.number, spree.order_path(order), class: "text-primary" %></td><td class="account-page-order-date"><%= l order.completed_at.to_date %></td><td class="account-page-order-status"><%= Spree.t("order_state.#{order.state}").titleize %></td><td class="account-page-order-payment-state"><%= Spree.t("payment_states.#{order.payment_state}").titleize if order.payment_state %></td>