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
Return nil (null) for :price & :total_price if not available in current_currency else return integer.
Matthew Kennedy55bc9da90661
diff --git a/core/app/models/spree/wished_product.rb b/core/app/models/spree/wished_product.rbindex ff331d028a..f3b23fc6ef 100644--- a/core/app/models/spree/wished_product.rb+++ b/core/app/models/spree/wished_product.rb@@ -11,11 +11,23 @@ module Spreevalidates :variant, :wishlist, presence: truedef price(currency)- variant.price_in(currency[:currency]).amount.to_i+ variant_price = variant.price_in(currency[:currency]).amount++ if variant_price.nil?+ variant_price+ else+ variant_price.to_i+ endenddef total(currency)- quantity * variant.price_in(currency[:currency]).amount.to_i+ variant_price = variant.price_in(currency[:currency]).amount++ if variant_price.nil?+ variant_price+ else+ quantity * variant_price.to_i+ endendendend