Order ID getting lost
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Order ID getting lost
Hello,
we have 100% rebates, and therefor I have created a hidden (display:none) "pay per voucher" payment, which basically is just an invoice payment, though, I use JavaScript to disable all other payment methods, display the "pay per voucher" and select it.
Now, whenever a customer uses this, he gets an error "Item with ID XX in 'order.id' not found" The process is running through, customer is created, order mail is send.
If i manualy select "pay per voucher" no error is given. Is there a hidden field somewhere i need to udpate too?
Typo3 9.5.7
Aimeos 19.4.4
aimeos_pay 19.4.1
we have 100% rebates, and therefor I have created a hidden (display:none) "pay per voucher" payment, which basically is just an invoice payment, though, I use JavaScript to disable all other payment methods, display the "pay per voucher" and select it.
Now, whenever a customer uses this, he gets an error "Item with ID XX in 'order.id' not found" The process is running through, customer is created, order mail is send.
If i manualy select "pay per voucher" no error is given. Is there a hidden field somewhere i need to udpate too?
Typo3 9.5.7
Aimeos 19.4.4
aimeos_pay 19.4.1
Re: Order ID getting lost
Not sure why the error occurs. Do you see your "Pay by voucher" payment option displayed in the summary page?
The better way might be to create a service decorator that you can apply to all payment options. If the order value is 0.00, isAvailable() should return false for all payment methods except "Pay by voucher":
https://aimeos.org/docs/Developers/Libr ... _decorator
The better way might be to create a service decorator that you can apply to all payment options. If the order value is 0.00, isAvailable() should return false for all payment methods except "Pay by voucher":
https://aimeos.org/docs/Developers/Libr ... _decorator
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Order ID getting lost
Yea, everything is like it is supposed, the only thing that is different is the payment status compared to me doing it manualy.
Would be easier to keep it like it is, but seems i have to do it..
Would be easier to keep it like it is, but seems i have to do it..
- Attachments
-
- Unbenannt-1.png (75.4 KiB) Viewed 2863 times
Re: Order ID getting lost
Where do i exactly create the decorator file though? I would assume i create it within my own extension that i use to do changes.
Do I just add PrePay, changePaymentService to the Service Item in Typo3 and it will fire the function within my Service Decorator or do i need to reference the function instead of the Class?
Code: Select all
class changePaymentService
extends \Aimeos\MShop\Service\Provider\Decorator\Base
implements \Aimeos\MShop\Service\Provider\Decorator\Iface
{
public function updatePayments (){}
}
Re: Order ID getting lost
You can only implement isAvailable() or calcPrice() in the decorator any yes, you only have to add the class name to the service provider fields (it will be available in the drop down list automatically).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Order ID getting lost
Okay, but where do I place the file or doesnt it matter?
Re: Order ID getting lost
In the same directory structure as in the core which corresponds to the namespace of the class.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Order ID getting lost
Alright, so I've created the file within
typo3conf/ext/"Extension Name"/Resources/Libraries/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator
Correct?
typo3conf/ext/"Extension Name"/Resources/Libraries/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator
Correct?
Re: Order ID getting lost
No, its ./typo3conf/ext/<extname>/Resources/Private/Extensions/<extname>/lib/custom/src/MShop/Service/Provider/Decorator/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Order ID getting lost
Either way, for testing purposes I created it in the Aimeos Extension and the error remains the same....