Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Make product modal reusable (#10861)

Daveyon Mayne976bea286d9c
diff --git a/frontend/app/views/spree/shared/_product_added_modal.html.erb b/frontend/app/views/spree/shared/_product_added_modal.html.erb
index b09d6d7d6c..1e1329c7eb 100644
--- a/frontend/app/views/spree/shared/_product_added_modal.html.erb
+++ b/frontend/app/views/spree/shared/_product_added_modal.html.erb
@@ -34,7 +34,7 @@
</div>
<div class="row pt-5 justify-content-center align-items-center product-added-modal-product">
<div class="col-4 col-sm-2 product-added-modal-product-image-container">
- <img class="product-added-modal-product-image-container-image" src="data:," alt="<%= @product.name %>">
+ <img class="product-added-modal-product-image-container-image" src="data:," alt="<%= @product&.name %>">
</div>
<div class="col-8 col-sm-6 col-lg-4 py-1 product-added-modal-product-details">
<div class="product-added-modal-product-details-name"></div>
@@ -48,7 +48,7 @@
<div class="row pb-4 justify-content-center">
<div class="col-12 col-lg-8">
<%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold text-uppercase product-added-modal-button', method: :get do %>
- <%= Spree.t('pdp.checkout') %>
+ <%= Spree.t(:checkout) %>
<% end %>
</div>
</div>