Order ID getting lost

Questions around the TYPO3 integration and plugins
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!
cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Order ID getting lost

Post by cyrotek » 02 Jul 2019, 11:50

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

User avatar
aimeos
Administrator
Posts: 7890
Joined: 01 Jan 1970, 00:00

Re: Order ID getting lost

Post by aimeos » 03 Jul 2019, 08:50

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
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Re: Order ID getting lost

Post by cyrotek » 03 Jul 2019, 09:03

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..
Attachments
Unbenannt-1.png
Unbenannt-1.png (75.4 KiB) Viewed 2757 times

cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Re: Order ID getting lost

Post by cyrotek » 03 Jul 2019, 09:35

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.

Code: Select all

class changePaymentService
	extends \Aimeos\MShop\Service\Provider\Decorator\Base
	implements \Aimeos\MShop\Service\Provider\Decorator\Iface
{

public function updatePayments (){}

}
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?

User avatar
aimeos
Administrator
Posts: 7890
Joined: 01 Jan 1970, 00:00

Re: Order ID getting lost

Post by aimeos » 03 Jul 2019, 09:53

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, Image give us a star

cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Re: Order ID getting lost

Post by cyrotek » 03 Jul 2019, 09:54

Okay, but where do I place the file or doesnt it matter?

User avatar
aimeos
Administrator
Posts: 7890
Joined: 01 Jan 1970, 00:00

Re: Order ID getting lost

Post by aimeos » 03 Jul 2019, 09:57

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, Image give us a star

cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Re: Order ID getting lost

Post by cyrotek » 03 Jul 2019, 10:06

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?

User avatar
aimeos
Administrator
Posts: 7890
Joined: 01 Jan 1970, 00:00

Re: Order ID getting lost

Post by aimeos » 03 Jul 2019, 10:17

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, Image give us a star

cyrotek
Posts: 58
Joined: 27 Jun 2019, 16:43

Re: Order ID getting lost

Post by cyrotek » 03 Jul 2019, 10:32

Either way, for testing purposes I created it in the Aimeos Extension and the error remains the same....

Post Reply