Access Order info in Process()
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Access Order info in Process()
I am implementing a custom payment method and am trying to access the order info in the process() function.
$get_order = $this->getOrder($order);
$order_base = $this->getOrderBase($order->getBaseId(), \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL);
Both $this->getOrder() and $this->getOrderBase() return just an array with the original $order_id that gets passed in to the process() function. $order_base->getPrice() returns Null.
Is it possible to write raw queries in the process() function to pull the data I want?
$get_order = $this->getOrder($order);
$order_base = $this->getOrderBase($order->getBaseId(), \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL);
Both $this->getOrder() and $this->getOrderBase() return just an array with the original $order_id that gets passed in to the process() function. $order_base->getPrice() returns Null.
Is it possible to write raw queries in the process() function to pull the data I want?
Re: Access Order info in Process()
The order object is already passed to the process() method so there's no need to use $this->getOrder() again.
The getOrderBase() returns an object of this type:
https://github.com/aimeos/aimeos-core/b ... /Iface.php
You didn't say anything about your used Aimeos version so I assume you use 2020.04+
Code: Select all
$basket = $this->getOrderBase($order->getBaseId(), \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL);
https://github.com/aimeos/aimeos-core/b ... /Iface.php
You didn't say anything about your used Aimeos version so I assume you use 2020.04+
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