Auto generate and attach documents
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
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]
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.