Sha256: 1d65c5dd2254e0484732e16f0deee4fa52ac4497a383d5203b88519dd7fcc040

Contents?: true

Size: 455 Bytes

Versions: 43

Compression:

Stored size: 455 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|
  variant.stock_items.each do |stock_item|
    Spree::StockMovement.create(quantity: 10, stock_item: stock_item)
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
solidus_sample-2.5.2 db/samples/stock.rb
solidus_sample-2.5.1 db/samples/stock.rb
solidus_sample-2.5.0 db/samples/stock.rb
solidus_sample-2.5.0.rc1 db/samples/stock.rb
solidus_sample-2.5.0.beta2 db/samples/stock.rb
solidus_sample-2.5.0.beta1 db/samples/stock.rb
solidus_sample-2.4.2 db/samples/stock.rb
solidus_sample-2.2.2 db/samples/stock.rb
solidus_sample-2.4.1 db/samples/stock.rb
solidus_sample-2.3.1 db/samples/stock.rb
solidus_sample-2.1.1 db/samples/stock.rb
solidus_sample-2.0.3 db/samples/stock.rb
solidus_sample-1.4.2 db/samples/stock.rb
solidus_sample-1.3.2 db/samples/stock.rb
solidus_sample-2.4.0 db/samples/stock.rb
solidus_sample-2.4.0.rc1 db/samples/stock.rb
solidus_sample-2.4.0.beta1 db/samples/stock.rb
solidus_sample-2.3.0 db/samples/stock.rb
solidus_sample-2.3.0.rc3 db/samples/stock.rb
solidus_sample-2.3.0.rc2 db/samples/stock.rb