Checkout Page
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 2
- Joined: 24 Nov 2016, 21:55
Checkout Page
I am trying to find a controller that is linked to the order page that submits data to mshop_order_base_product
I want to extract all of the items that the user has just ordered (need a to find function for that) and then submit those items into a new table I have created.
I want to extract all of the items that the user has just ordered (need a to find function for that) and then submit those items into a new table I have created.
Re: Checkout Page
There's an order controller that has a store() method which cares about saving the basket to the mshop_order* tables:
https://github.com/aimeos/ai-controller ... rd.php#L35
Note that no payment has been executed for that order at this point and it's uncertain if the order will be payed in the future. I you only want to retrieve payed orders, you should implement an async job controller (cronjob) like that one: https://github.com/aimeos/ai-controller ... andard.php
You can get the complete order (or only parts from) by using the load() method of the order base manager:
https://github.com/aimeos/aimeos-core/b ... ce.php#L70
https://github.com/aimeos/ai-controller ... rd.php#L35
Note that no payment has been executed for that order at this point and it's uncertain if the order will be payed in the future. I you only want to retrieve payed orders, you should implement an async job controller (cronjob) like that one: https://github.com/aimeos/ai-controller ... andard.php
You can get the complete order (or only parts from) by using the load() method of the order base manager:
https://github.com/aimeos/aimeos-core/b ... ce.php#L70
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
-
- Posts: 2
- Joined: 24 Nov 2016, 21:55
Re: Checkout Page
Is there a way where I can create a controller in App\Http\Controllers and call Aimeos Functions There?
Id like to extract the order details just product code, name, quantity.
Id like to extract the order details just product code, name, quantity.
Re: Checkout Page
Let Laravel inject the context into your controller class like this:
https://github.com/aimeos/aimeos-larave ... ge.php#L57
Then you can use the context to create the manager and get the orders:
https://github.com/aimeos/aimeos-larave ... ge.php#L57
Then you can use the context to create the manager and get the orders:
Code: Select all
$context = $this->context->get();
$manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base/product' );
$search = $manager->createSearch();
$search->setConditions( $search->compare( '>=', 'order.base.ctime' '2016-12-01 00:00:00' ) );
$search->setSlice( 0, 100 );
$orderedProducts = $manager->searchItems( $search );
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