Comments

pcambra’s picture

Category: feature » task

heh, yeah, you're right, I've updated the description in the module, I wonder if we're going to need to export payment entities as well...

rfay’s picture

Yeah, everything :-) Wish it was all ctools-exportable.

pcambra’s picture

Actually, product types and tax rates and types should be ctools doable just adding the export property to the schema as they're table based and the primary key is "simple".

The rest is code based so I'm not really sure if it's ctools exportable.

rfay’s picture

pcambra’s picture

Status: Active » Needs review
StatusFileSize
new2.49 KB

Ok, this one is slightly different as we don't create order types in commerce, so there's only one element to export just to leverage fields and dependencies to features.

rfay’s picture

Ooops.. I think we will in fact end up creating new order types. A client was proposing that yesterday and Ryan said that yes, that's a normal expectation, and will require code just like the line item code required.

Thanks for the effort on this!

pcambra’s picture

Status: Needs review » Postponed

Let's mark this as postponed until order type ui happens.

pcambra’s picture

Maybe this project is worthy of follow: http://drupal.org/sandbox/manatwo/1341264

rfay’s picture

@pcambra you're on top of things! Created today, no commits :-) I was thinking it was time to experiment with this. And there goes manatwo.

markwk’s picture

Just ran into this issue as I was working through the Order setup for creating a Marketplace. I was a bit surprised it couldn't be exported....

pcambra’s picture

#10 you could try patch #5 and let me know if it works for you.

rfay’s picture

Title: Allow export of orders » Allow export of order types

#7 yeah, I added an order example in Commerce Examples, and it's hard to use without an Order UI. However, you can edit the code there and add fields, etc.

markwk’s picture

@rfay: cheers for the starting point. That's really a bit help that example... thanks!

markwk’s picture

StatusFileSize
new821 bytes

looks like the patch has some issues with current stuff so I fixed it up and attached...

pcambra’s picture

Yeah, those are known issues :) you missed the actual include file for the features, though

markwk’s picture

StatusFileSize
new2.63 KB

forgot to do a "git diff --staged"

dabblela’s picture

Component: Documentation » Code
Status: Postponed » Active

I have committed working code to the commerce_order_types sandbox project and I'm working on getting this integration working. Unfortunately, #16 doesn't seem to work out of the box for the commerce_order_types module.

pcambra’s picture

Yes, this won't work "magically" with a custom implementation of a Order type UI, what this patch does is just to track fields in the existing order type. You'd need to implement some more code as we did for the line item types #1314706

dabblela’s picture

I have working code for the Commerce Order Types project; would it be better to work a generic implementation for export of order types? Unfortunately, there is no commerce order equivalent to commerce_line_item_types().

bojanz’s picture

Status: Active » Postponed

We can't do this until there's a full project for adding order types through the UI.

We made a decision with product types: only what's in the DB gets handled by features.
If there's only a hook, then that doesn't need features at all.

mparker17’s picture

Assigned: Unassigned » mparker17
Status: Postponed » Needs work
StatusFileSize
new2.72 KB

The Commerce order types module has a stable release now.

I've tried re-rolling the patch, but it currently doesn't pick up on the new order types defined by that module. I'll probably have to re-write the features-export part of it.

bojanz’s picture

Status: Needs work » Needs review
StatusFileSize
new3.7 KB

Let's try this.

bojanz’s picture

StatusFileSize
new3.7 KB

And once again.

bojanz’s picture

StatusFileSize
new3.88 KB

Final version, works in my testing.

bojanz’s picture

Title: Allow export of order types » Add support for exporting order types defined through the commerce_order_types module
Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

David Stosik’s picture

Assigned: mparker17 » Unassigned
Category: task » bug
Status: Closed (fixed) » Active

Hello,

This does not work for me, I don't see commerce order types in the list of components available in features (drush features-components).

Commerce order and Commerce order types are enabled on my site.

Looking at the code, I see in commerce_features.module:49 'default_hook' => 'commerce_order_default_types',
But I can't find commerce_order_default_types function anywhere. Is it expected to work as is?

Thank you,
David

David Stosik’s picture

Hello, here's a follow-up:

I cannot export an order type using Drush, but I was able to do so using Features admin page.

Moreover, when I install and revert my feature on another site, the custom order types contained in my feature are not created. It looks like the implementation lacks something important...

David

bojanz’s picture

I have a production site using it successfully.
Let us know what you debugging finds.

David Stosik’s picture

Yeah, sorry about that, the second part of my previous post (#28) was due to an older version of commerce_features installed on the target site.

Still, I can't export order types using Drush. Any idea about that?

David

bojanz’s picture

Haven't tested drush, so it's not impossible that there is a bug there.

mglaman’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Exporting via Drush should be automatically handled through Features, not a special implementation. Moving back to Closed (fixed.)