Skip to content
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

Auto generate and attach documents #261

Open
loeffe1 opened this issue Sep 12, 2019 · 2 comments
Open

Auto generate and attach documents #261

loeffe1 opened this issue Sep 12, 2019 · 2 comments
Assignees

Comments

@loeffe1
Copy link
Contributor

loeffe1 commented Sep 12, 2019

Bug Report

Current Behavior
The setting autoGenerateDocuments has no effect.

Expected behavior/output
If cart_pdf is used along with this extension, pdf documents should be created on order creation and attached to the mails if attachDocuments is set aswell.

Environment

  • TYPO3 version(s): 8.7.27
  • cart version: 5.5.2
  • Is your TYPO3 installation set up with Composer yes
  • OS: Windows 10
@loeffe1
Copy link
Contributor Author

loeffe1 commented Sep 17, 2019

There is an inconsistency within the finishers which results in the DocumentFinisher from never being called when cart_paypal is being used:

cart_pdf:

plugin.tx_cart {
    finishers {
        order {
            350 {
                class = Extcode\CartPdf\Domain\Finisher\Order\DocumentFinisher
            }
        }
    }
}

cart_paypal:
$this->pluginSettings['finishers']['order'][$returnStatus]

@extcode
Copy link
Owner

extcode commented Nov 22, 2019

I think I have to add this to documentation. The finisher Pipeline of the Cart-Extension terminates here

plugin.tx_cart {
    finishers {
        order {
            300 {
                class = Extcode\Cart\Domain\Finisher\Order\PaymentFinisher
            }
        }
    }
}

when any installed payment provider extension says: "I will handle this order".
Because you won't generate documents or send emails if a payment fails.
So each of my payment provider has an own finisher pipeline. For cart_paypal it looks like:

plugin.tx_cartpaypal {
    finishers {
        order {
            success {
                400 {
                    class = Extcode\Cart\Domain\Finisher\Order\EmailFinisher
                }
                500 {
                    class = Extcode\Cart\Domain\Finisher\Order\ClearCartFinisher
                }
            }
        }
    }
}

This allows you different finishers for each payment provider. If you want to generate the documents for cart_paypal as well you have to add the finisher to this pipeline before the EmailFinisher. You should take the same number (350), but that's not absolutely necessary. The number only determines the order.

@extcode extcode self-assigned this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants