Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/cc-855-exception-when-user-tries-to…
Browse files Browse the repository at this point in the history
…-visit-already-deleted-shopping-list
  • Loading branch information
dimitrymorozovspryker committed Nov 3, 2018
2 parents 6da513c + 07dca66 commit d98250a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "proprietary",
"require": {
"php": ">=7.1",
"spryker-shop/cart-to-shopping-list-widget": "^0.4.0",
"spryker-shop/shop-application": "^1.2.0",
"spryker-shop/shop-ui": "^1.0.0",
"spryker-shop/shopping-list-page-extension": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SprykerShop\Yves\ShoppingListPage\Controller;

use SprykerShop\Yves\CartToShoppingListWidget\CartToShoppingListWidgetConfig;
use SprykerShop\Yves\ShoppingListPage\Plugin\Provider\ShoppingListPageControllerProvider;
use Symfony\Component\HttpFoundation\Request;

class CartToShoppingListController extends AbstractShoppingListController
Expand Down Expand Up @@ -50,8 +50,7 @@ protected function executeCreateFromCartAction(int $idQuote, Request $request)
->createShoppingListFromCart($cartToShoppingListForm);

$this->addSuccessMessage(static::GLOSSARY_KEY_SHOPPING_LIST_CART_ITEMS_ADD_SUCCESS);

return $this->redirectResponseInternal(CartToShoppingListWidgetConfig::SHOPPING_LIST_REDIRECT_URL, [
return $this->redirectResponseInternal(ShoppingListPageControllerProvider::ROUTE_SHOPPING_LIST_DETAILS, [
'idShoppingList' => $shoppingListTransfer->getIdShoppingList(),
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
use Generated\Shared\Transfer\ShoppingListFromCartRequestTransfer;
use Generated\Shared\Transfer\ShoppingListTransfer;
use Spryker\Yves\Kernel\PermissionAwareTrait;
use SprykerShop\Yves\CartToShoppingListWidget\Form\ShoppingListFromCartForm;
use SprykerShop\Yves\ShoppingListPage\Dependency\Client\ShoppingListPageToShoppingListClientInterface;

class ShoppingListFromCartFormDataProvider
{
use PermissionAwareTrait;

protected const OPTION_SHOPPING_LISTS = 'OPTION_SHOPPING_LISTS';

protected const GLOSSARY_KEY_CART_ADD_TO_SHOPPING_LIST_FORM_ADD_NEW = 'cart.add-to-shopping-list.form.add_new';

/**
Expand Down Expand Up @@ -49,7 +50,7 @@ public function getOptions(): array
{
return [
'data_class' => ShoppingListFromCartRequestTransfer::class,
ShoppingListFromCartForm::OPTION_SHOPPING_LISTS => $this->getShoppingListCollection(),
static::OPTION_SHOPPING_LISTS => $this->getShoppingListCollection(),
];
}

Expand Down

0 comments on commit d98250a

Please sign in to comment.