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
Add products to Summer 2021 and 30% off taxons. (#11260)
Matthew Kennedy04a09f7015d6
diff --git a/sample/db/samples/products.rb b/sample/db/samples/products.rbindex 79c9f7cace..3e58678070 100644--- a/sample/db/samples/products.rb+++ b/sample/db/samples/products.rb@@ -40,7 +40,7 @@ PRODUCTS.each do |(parent_name, taxon_name, product_name)|endend-Spree::Taxon.where(name: ['Bestsellers', 'New', 'Trending', 'Streetstyle', 'Summer Sale']).each do |taxon|+Spree::Taxon.where(name: ['Bestsellers', 'New', 'Trending', 'Streetstyle', 'Summer Sale', "Summer #{Date.today.year}", '30% Off']).each do |taxon|next if taxon.products.any?taxon.products << Spree::Product.all.sample(30)