Skip to content

Commit

Permalink
sw53x-RATEPLUG-27: fix batch processing (admin) (#45)
Browse files Browse the repository at this point in the history
* RATEPLUG-27: fix batch processing (admin)

* sw53x-RATEPLUG-27: add changelog
  • Loading branch information
rommelfreddy authored Jan 15, 2020
1 parent b528094 commit 77a1775
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Bootstrapping/Events/OrderOperationsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,21 @@ public function onBidirectionalSendOrderOperation(\Enlight_Hook_HookArgs $argume
*/
public function afterOrderBatchProcess(\Enlight_Hook_HookArgs $arguments)
{
$request = $arguments->getSubject()->Request();

$config = Shopware()->Plugins()->Frontend()->RpayRatePay()->Config();

if (!$config->get('RatePayBidirectional')) {
return;
}
$controller = $arguments->getSubject();

$orders = $request->getParam('orders');
$orders = $controller->Request()->getParam('orders', []);
$singleOrderId = $controller->Request()->getParam('id', null);

if (count($orders) < 1 && empty($singleOrderId)) {
return;
}

if (count($orders) < 1) {
throw new \Exception('No order selected');
if (count($orders) == 0) {
$orders = [['id' => $singleOrderId]];
}

foreach ($orders as $order) {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
### Version 5.3.14 - Released 2020-01-15
* RATEPLUG-19: birthday input: also allow whitespaces instead of zeros
* RATEPLUG-24: add support for different stores/subshops
* RATEPLUG-27: fix batch processing (admin)
* RATEPLUG-28: fix double click on "order now"-button
* RATEPLUG-67: set phone number as not required field and apply static phonenumber if no phone number is provided
* fix a few bugs with zero percent installment
Expand Down

0 comments on commit 77a1775

Please sign in to comment.