-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orders - Element Export vs Commerce Export #976
Comments
Hey @engram-design Can definitely see that this could be confusing to the end-user. Will have to have a think about this, to see if we transition to the CMS style of exports or stick with the Commerce variety. In the meantime, and I know this is less than ideal, but you could add a quick bit of code to hide the native exports bar on the orders view in the CP. Throw something like the following in a custom module: Event::on(View::class, View::EVENT_END_BODY, function($event) {
$request = Craft::$app->getRequest();
if ($request->isCpRequest && $request->fullPath == 'admin/commerce/orders') {
$js = "(function(){ $('#content-container #footer').hide(); })();";
$event->sender->registerJs($js);
}
}); Again, I know this isn't a nice solution but could cause fewer issues for clients in the interim while we come up with a solution. Thanks. |
Thanks for the feedback @nfourtythree I think we'll go ahead and do that. Not 100% sure what the best approach would be here - I suppose siding with the native Craft export behaviour. Only issue for us is being able to modify the output before the file is generated. I suppose this is due to Commerce implementing this feature before Craft did! Thanks, |
No problem @engram-design . Will chat with everyone here, but ideally, we will transition to using the native Craft export but then add in some events so we give people greater flexibility and there is no loss of functionality. This would likely be a breaking changing and if it does happen would be in a major release cycle. |
Going to introduce into core the concept of exports which are extensible like element actions. |
Fixed in commerce 3.0-RC1 |
I've noticed that the native Element Export (introduced in Craft 3.2 with paginating order elements) exports differently to the normal Commerce export functionality. This is a bit confusing for clients, as these two buttons should do the same thing.
In our use-case, we're using
beforeGenerateExport
to modify the export.The text was updated successfully, but these errors were encountered: