Skip to content

Commit

Permalink
Fix abandoned cart restore URL requiring admin login
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jun 25, 2019
1 parent 71233ac commit 1155aaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased] 1.0.6
## 1.0.6 - 2019-06-25
### Fixed
- Fix missing customer email for guest customers
- Fix abandoned cart restore URL requiring admin login

## 1.0.5 - 2019-06-25
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function actionRestore ()
$settings = MailchimpCommerce::getInstance()->getSettings();
$session = Craft::$app->getSession();

$number = Craft::$app->getRequest()->getRequiredBodyParam('number');
$number = Craft::$app->getRequest()->getRequiredQueryParam('number');
$order = $commerce->getOrders()->getOrderByNumber($number);

if (!$order)
Expand Down
4 changes: 2 additions & 2 deletions src/services/OrdersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ private function _buildOrderData ($orderId)
}
else
{
$data['checkout_url'] = UrlHelper::actionUrl(
'mailchimp-commerce/order/restore',
$data['checkout_url'] = UrlHelper::siteUrl(
Craft::$app->getConfig()->getGeneral()->actionTrigger . '/mailchimp-commerce/order/restore',
['number' => $order->number]
);
}
Expand Down

0 comments on commit 1155aaf

Please sign in to comment.