Sha256: 56ca3c255bfda4109d18947b055fb6f3ea8b68dfdba69a51d934fe0bbce80061
Contents?: true
Size: 764 Bytes
Versions: 36
Compression:
Stored size: 764 Bytes
Contents
Spree::Sample.load_sample("variants") country = Spree::Country.find_by(iso: 'US') location = Spree::StockLocation.first_or_create!(name: 'default', address1: 'Example Street', city: 'City', zipcode: '12345', country: country, state: country.states.first) location.active = true location.save! Spree::Variant.all.each do |variant| next if variant.is_master? && variant.product.has_variants? variant.stock_items.each do |stock_item| Spree::StockMovement.create(quantity: 10, stock_item: stock_item) end end
Version data entries
36 entries across 36 versions & 1 rubygems