Needs work
Project:
Commerce Feeds
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 May 2011 at 18:52 UTC
Updated:
16 May 2021 at 15:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rickmanelius commentedSubscribing
Comment #2
hozt commentedFrom the lack of response I guess this may not be on the roadmap.
If this was done with commerce feeds / feeds then I think three difference feeds would make up each order
1) Order data - user, date, amount, etc
2) Line items - skus, qty, cost
3) Payments - amount, type, etc
Comment #3
rickmanelius commentedOne of the difficult things with orders is going to be all the additional line items and discounts from other data structures (volusion, big commerce, etc). A clear mapping may not be so straightforward.
Comment #4
rfayCommerce Migrate does support orders. I suspect that orders are not the best use case for commerce feeds, but perhaps...
Comment #5
rickmanelius commented@rfay. Thanks for the heads up. I saw you vimeo video using feeds (used it, worked great!) but yeah, I did have some concerns using feeds for orders.
Personally, I'm thinking it's better to invest time learning migrate then for that portion and not try to force feeds to go this route unless someone can create an elegant solution.
Comment #6
hozt commentedI have tested Commerce Migrate and it works for doing an initial migration of orders and products, but support is only built-in for Ubercart so any other shopping cart would have to be manually coded.
Feeds / Commerce Feeds has several advantages including having the ability to map fields from the source to the destination which would allow nearly any third party store have its orders imported into Commerce. Another advantage that is essential in my use case is that I need orders to be imported continually from another system which works with Feeds. Feeds also has several good plugins modules like Feeds Tamper or Feeds Regex which allows the data to be modified on import.
Comment #7
rickmanelius commented@hotz
That's a good point. i used feeds to map a volusion store product catalog in and it was pretty simple. My only worry with orders is handling the inline items, taxes, coupons, etc. It can potentially be complex. But hopefully we can at least get basic imports done and go from there.
Comment #8
pcambraThere is also an issue related with importing "generic" entities in feeds #1033202: [Meta] Generic entity processor
Comment #9
ronald54 commentedImporting Orders can be very helpfull, especialy, when you are running a webshop as a center for other product platforms.
If orders from other platforms are comming in, it would be great to just import and track this order centraly in the commerce shop, creating central invoices ad packing sleeves, and finaly ship the goods and document this on one central place.
This is the way, I am planing the use of commerce.
Comment #10
ronald54 commentedI am missing an orders processor for commerce_feeds.
Is there somethins alike, I might modify for my needs?
Comment #11
JulienD commentedHi guys
Here is a patch to import orders with feeds. Of course you need first to import products and customers profiles. If the profile is unknow from the database, a new one would be created.
I tried be to generically as much as possible but let me know if changes are needed
I also added some dummy orders examples in the second patch.
Hope this can help
Best,
Julien.
Comment #12
JulienD commentedHere is a better demo patch, forget commerce_feeds_example-Dummy_orders_examples-1156952-11.patch in #11 and use this one. In addition to the .csv file I've added a default feed order import.
Best,
Julien.
Comment #13
pcambraCould you include both patches in one single?
Comment #14
pcambraComment #15
JulienD commentedOk, here a full patch of all my changes.
Comment #16
JulienD commentedComment #17
pcambraIn general looks great, here are some things I've seen in the review
Let's better use a metadata wrapper in order not to care about the language
"profile"
Why do you change the default country?
We should expose the profile type in the settings of the processor, same goes to line item type, if > 1, let's expose a setting
same as above, better to wrap this so we don't care about languages
hook_feeds_term?
Can we use DBTNG here?
product id is not in the order
I don't think we have the sku here, do we? $order->sku
Comment #18
JulienD commentedI corrected my patch and exposed more information in the settings of the processor.
I based my order parser on the other parser, and this is just a copy/paste. This mention is also in the other parser. I haven't corrected the typo in the other files, should we open a new issues for that ?
According to this @todo found in feeds module "feeds_alter: This needs to be removed and drupal_alter() used. This is crazy dumb." I've replaced the feeds_alter() function.
Comment #19
pcambraGreat! it's a good progress here, feel free to open a new issue for fixing typos and code style.
Why not using the author id in the first place?
We'd want to add the "Replaced by" text as the other other processors have now
What does this code do? isn't status something that should be filled in no matter what? i.e. default to cart.
Isn't an author of the orders configured in the importer settings? can this ever be empty?
I don't think product_id or sku are properties of the order and definitely they're not unique, any order might have several line items and these have a product each. We should add an example for this
Why not use entity metadata wrapper here too?
profile
Why just billing? we might want to make this configurable?
And line items?
Why are these at order level?
I think feeds has stopped to use the try catch thing
if order id is set we don't need to add further conditions
Same as above, SKU and product id can't be at the order level?
If we're using entity metadata wrapper, it's better to add an explicit dependency to entity api module.
I'm not sure about the implementation on the relationships to the customer profiles and the line items, for the profiles, we might want to just add ids or references, and the products can't be at order level directly, we need a line item in the middle.
Comment #20
milekium commentedpromising pacth. actually only works with the default address fields in the billing profile, not with extra fields in billing profile, neither can inport data into shipping profile fields. hope could do it.
Comment #21
chingis commentedThanks for patch, guys.
I fixed patch from #18, there were wrong paths, also I removed customer profile type selection, so now by default all customer profile types available in mapping.
I didn't apply fixes described in #19 though.
Patch attached.
UPD:
It seems Processor in current state can't handle all customer profile types, but only creation of new billing customer profiles
Comment #22
hyperglide commentedPing.. any comments on #21.
Comment #23
pcambra#19 hasn't been taken into account yet :)
Comment #24
robit8deb commentedanyone have this working? i have a need to bulk update order status based on order id but its not working.
i have order id, status and sku (only because it said it was required) but even though just those three fields are mapped i get an error about quantity format.
Any help is appreciated.
Comment #25
hyperglide commented@robit8deb per #23 seems this is a work in progress.
Comment #26
bryangruneberg commentedFor coders wanting to do this, the commerce_migrate_ubercart module provides a really good starting point. My migration is very custom from a legacy platform, so my strategy is to us commerce_migrate_ubercart as the foundation, and hack-and-slash that to work for my use case.
At the least commerce_migrate_ubercart will provide a good example of how to get this done.
Comment #27
allen.jared@gmail.com commentedis there a way to get multiple products listed into one order?
Comment #28
Dj_C4 commentedAny updates or help installing this would be awesome. I really need to be able to bulk import users / orders.
Comment #29
zeezhao commentedPlease has anyone been able to get this to work? I am using latest patch #21.
- Manually fixed some typos.
- Got it all setup correctly and mapped some fields.
- during the importing of a file I get this error:
"Missing bundle property on entity of type commerce_order."
[edit]
Finally got it to work. Needed to reselect bundle, etc.
Noticed a few potential issues with current version e.g
- Time: it appears time created is used to denote same order. Hence may cause issue if orders loaded from multiple stores and clash in times.
- Totals/Tax: calculating own totals using qty * price, instead of what was used at order time.
- Payments: will need to be entered separately via front-end as not part of import.
- Multiple items on an order: shows in detail on order but not in view or quickedit.
Comment #30
thaistore commentedany idea how to import different product variations into one node, there was a module for tht but it does not work
i dont want to create 6 diferent CSV files for each product variation though
any idea?
Comment #31
mglamanComment #32
nikolino commentedHello,
I'm using Commerce Feeds to import orders within my ecommerce. I insert a SKU variant per line and it is sufficient that the date and the user is the same and it creates a single order.
My questions are:
- can I also import the id of the order? currently it is generated automatically, but if I try to import it, it gives me error
- how can I import the shipment cost?
- how can I set the taxes?
Thank you
Comment #33
maxplus commentedHi,
I also need this feature.
=> I will the patches a try and post back my testing results.
Comment #34
srbracelin commentedSomething like this would be great so that we can import tracking info for our orders from our custom shipping software.
Comment #35
jieyyal commentedHi,
I tried the patch commerce-order-support-1156952.patch
But I get the error:
Missing Feeds plugin FeedsCommerceOrderProcessor. See order_impoter. Check whether all required libraries and modules are installed properly.
To fix the issue I believe we need add the plugin in the module info.
Here made a new patch for this feature:
commerce-order-support-1156952-35.patch
Thank you!
Comment #36
jieyyal commentedMissed the plugin in patch, re-upload the patch.
Comment #37
kristofferromI'm getting this error "Order status ("Completed") is invalid." on all items.
Does this field need to be formatted in a particular way? The destination are of course already working with a 'Completed' order status...
Comment #38
knipnehpets commentedupdate: looks like you can now do this using
feeds_entity_processor module.
I guess at a minimum you'll need to create the orders first, then the line items to add onto them (these have separate processors in the list).
Comment #39
firfin commentedI used the following code in a custom module to achieve this, not very generic and probably not best practice, but is works (for me). In my own module
class LmbImporterProcessor extends FeedsProcessor {I have the following code, in the bit beleo I removed all extra trimmings (feedback messages etc).