solidusio-contrib / solidus_importer

Solidus importer extension to migrate data from other eCommerce systems
BSD 3-Clause "New" or "Revised" License
15 stars 30 forks source link

Allow multiple Line items to be imported for the Orders #62

Closed cesartalves closed 3 years ago

cesartalves commented 3 years ago

I was unable to import 2 line items for an Order using the samples included here https://github.com/solidusio-contrib/solidus_importer/pull/59. I imported the customer, products and then the Order, but only one of the line items will be included in the Order.

I put a byebug on this line and it is clear that on the second row the line_items_attributes is still empty, instead of containing the previous row's attributes.

To further check you can add the following expectation to spec/features/solidus_importer/import_spec.rb, ln 172:

it 'imports order with line items' do
      import
      expect(imported_order.line_items).not_to be_blank
      expect(imported_order.line_items.count).to eq 3
    end

Which will fail - 3 variants are provided but only 1 LiteItem is created.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.