diff --git a/app/code/Magento/Checkout/Controller/Cart/Configure.php b/app/code/Magento/Checkout/Controller/Cart/Configure.php
index 1a0fc1f3148f350051b14497ac9dd8fbec9daf99..0c09470858bd3bbf929fc9a5667b64a497bb1a57 100644
--- a/app/code/Magento/Checkout/Controller/Cart/Configure.php
+++ b/app/code/Magento/Checkout/Controller/Cart/Configure.php
@@ -44,18 +44,19 @@ class Configure extends \Magento\Checkout\Controller\Cart
     {
         // Extract item and product to configure
         $id = (int)$this->getRequest()->getParam('id');
+        $productId = (int)$this->getRequest()->getParam('product_id');
         $quoteItem = null;
         if ($id) {
             $quoteItem = $this->cart->getQuote()->getItemById($id);
         }
 
-        if (!$quoteItem) {
-            $this->messageManager->addError(__("We can't find the quote item."));
-            $this->_redirect('checkout/cart');
-            return;
-        }
-
         try {
+            if (!$quoteItem || $productId != $quoteItem->getProduct()->getId()) {
+                $this->messageManager->addError(__("We can't find the quote item."));
+                $this->_redirect('checkout/cart');
+                return;
+            }
+
             $params = new \Magento\Framework\Object();
             $params->setCategoryId(false);
             $params->setConfigureMode(true);
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml
index 22ca2df12cec6add0680d95fcd284acc646ce85f..3fdbfc2c3cabc3be035e98cabd7a2f36cbb42456 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml
+++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml
@@ -6,6 +6,9 @@
  */
 -->
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
+    <head>
+        <title>Success Page</title>
+    </head>
     <body>
         <referenceBlock name="page.main.title">
             <block class="Magento\Checkout\Block\Onepage\Success" name="checkout.success.print.button" template="button.phtml"/>
diff --git a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
index 5ea53255269edf7ca4d32b50a0b90fe176d3c146..e9bca9477d829c01fe0c92260310c6378b5a71ac 100644
--- a/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
@@ -7,6 +7,9 @@
 -->
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
     <update handle="multishipping_checkout"/>
+    <head>
+        <title>Success Page</title>
+    </head>
     <body>
         <referenceBlock name="page.main.title">
             <action method="setPageTitle">
diff --git a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php
index 59bc27a01ce7ffa1193b4de3b6dd344bfe5c88c6..19e2f81d657c3c5232fd484eb4cc12eb4750a2cf 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php
@@ -57,7 +57,9 @@ class ByPercent extends AbstractDiscount
         $discountData->setAmount(($qty * $itemPrice - $item->getDiscountAmount()) * $_rulePct);
         $discountData->setBaseAmount(($qty * $baseItemPrice - $item->getBaseDiscountAmount()) * $_rulePct);
         $discountData->setOriginalAmount(($qty * $itemOriginalPrice - $item->getDiscountAmount()) * $_rulePct);
-        $discountData->setBaseOriginalAmount(($qty * $baseItemOriginalPrice - $item->getDiscountAmount()) * $_rulePct);
+        $discountData->setBaseOriginalAmount(
+            ($qty * $baseItemOriginalPrice - $item->getBaseDiscountAmount()) * $_rulePct
+        );
 
         if (!$rule->getDiscountQty() || $rule->getDiscountQty() > $qty) {
             $discountPercent = min(100, $item->getDiscountPercent() + $rulePercent);
diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Cart/ConfigureTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Cart/ConfigureTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..716661bd022b1c8f81e0fa397bb1bf4f48ae5232
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Cart/ConfigureTest.php
@@ -0,0 +1,250 @@
+<?php
+/**
+ * Copyright © 2015 Magento. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Checkout\Controller\Cart;
+
+/**
+ * Shopping cart edit tests
+ */
+class ConfigureTest extends \PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var \Magento\Framework\ObjectManagerInterface | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $objectManagerMock;
+
+    /**
+     * @var \Magento\Framework\View\Result\PageFactory | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $resultPageFactoryMock;
+
+    /**
+     * @var \Magento\Framework\App\ResponseInterface | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $responseMock;
+
+    /**
+     * @var \Magento\Framework\App\RequestInterface | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \Magento\Framework\Message\ManagerInterface | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $messageManagerMock;
+
+    /**
+     * @var \Magento\Framework\App\Response\RedirectInterface | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $redirectMock;
+
+    /**
+     * @var \Magento\Checkout\Controller\Cart\Configure | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $configureController;
+
+    /**
+     * @var \Magento\Framework\App\Action\Context | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $contextMock;
+
+    /**
+     * @var \Magento\Checkout\Model\Cart | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $cartMock;
+
+    public function setUp()
+    {
+        $eventManagerMock = $this->getMockBuilder('Magento\Framework\Event\ManagerInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $urlMock = $this->getMockBuilder('Magento\Framework\UrlInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $actionFlagMock = $this->getMockBuilder('Magento\Framework\App\ActionFlag')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $viewMock = $this->getMockBuilder('Magento\Framework\App\ViewInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $this->objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManagerInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $this->responseMock = $this->getMockBuilder('Magento\Framework\App\ResponseInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $this->requestMock = $this->getMockBuilder('Magento\Framework\App\RequestInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['getParam'])
+            ->getMockForAbstractClass();
+        $this->messageManagerMock = $this->getMockBuilder('Magento\Framework\Message\ManagerInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMockForAbstractClass();
+        $this->redirectMock = $this->getMockBuilder('Magento\Framework\App\Response\RedirectInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMock();
+
+        $this->contextMock = $this->getMockBuilder('Magento\Framework\App\Action\Context')
+            ->setConstructorArgs(
+                [
+                    $this->requestMock,
+                    $this->responseMock,
+                    $this->objectManagerMock,
+                    $eventManagerMock,
+                    $urlMock,
+                    $this->redirectMock,
+                    $actionFlagMock,
+                    $viewMock,
+                    $this->messageManagerMock
+                ]
+            )
+            ->setMethods([])
+            ->getMock();
+        $this->contextMock->expects($this->any())->method('getObjectManager')->willReturn($this->objectManagerMock);
+        $this->contextMock->expects($this->any())->method('getRequest')->willReturn($this->requestMock);
+        $this->contextMock->expects($this->any())->method('getResponse')->willReturn($this->responseMock);
+        $this->contextMock->expects($this->any())->method('getMessageManager')->willReturn($this->messageManagerMock);
+        $this->contextMock->expects($this->any())->method('getRedirect')->willReturn($this->redirectMock);
+        $scopeConfig = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $session = $this->getMockBuilder('Magento\Checkout\Model\Session')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface')
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $formKeyValidator = $this->getMockBuilder('Magento\Core\App\Action\FormKeyValidator')
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->cartMock = $this->getMockBuilder('Magento\Checkout\Model\Cart')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->resultPageFactoryMock = $this->getMockBuilder('Magento\Framework\View\Result\PageFactory')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->configureController = new \Magento\Checkout\Controller\Cart\Configure(
+            $this->contextMock,
+            $scopeConfig,
+            $session,
+            $storeManager,
+            $formKeyValidator,
+            $this->cartMock,
+            $this->resultPageFactoryMock
+        );
+    }
+
+    /**
+     * Test checks controller call product view and send parameter to it
+     *
+     * @return void
+     */
+    public function testPrepareAndRenderCall()
+    {
+        $quoteId = 1;
+        $actualProductId = 1;
+        $quoteMock = $this->getMockBuilder('Magento\Quote\Model\Quote')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $quoteItemMock = $this->getMockBuilder('Magento\Quote\Model\Quote\Item')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $viewMock = $this->getMockBuilder('Magento\Catalog\Helper\Product\View')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $pageMock = $this->getMockBuilder('Magento\Framework\View\Result\Page')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $buyRequestMock = $this->getMockBuilder('Magento\Framework\Object')
+            ->disableOriginalConstructor()
+            ->getMock();
+        //expects
+        $this->requestMock->expects($this->at(0))
+            ->method('getParam')
+            ->with('id')
+            ->willReturn($quoteId);
+        $this->requestMock->expects($this->at(1))
+            ->method('getParam')
+            ->with('product_id')
+            ->willReturn($actualProductId);
+        $this->cartMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
+
+        $quoteItemMock->expects($this->exactly(1))->method('getBuyRequest')->willReturn($buyRequestMock);
+
+        $this->resultPageFactoryMock->expects($this->once())->method('create')->willReturn($pageMock);
+        $this->objectManagerMock->expects($this->at(0))
+            ->method('get')
+            ->with('Magento\Catalog\Helper\Product\View')
+            ->willReturn($viewMock);
+
+        $viewMock->expects($this->once())->method('prepareAndRender')->with(
+            $pageMock,
+            $actualProductId,
+            $this->configureController,
+            $this->callback(
+                function ($subject) use ($buyRequestMock) {
+                    return $subject->getBuyRequest() === $buyRequestMock;
+                }
+            )
+        )->willReturn($pageMock);
+
+        $quoteMock->expects($this->once())->method('getItemById')->willReturn($quoteItemMock);
+        $quoteItemMock->expects($this->exactly(2))->method('getProduct')->willReturn($productMock);
+
+        $productMock->expects($this->exactly(2))->method('getId')->willReturn($actualProductId);
+
+        $this->assertSame($pageMock, $this->configureController->execute());
+    }
+
+    /**
+     * Test checks controller redirect user to cart
+     * if user request product id in cart edit page is not same as quota product id
+     *
+     * @return void
+     */
+    public function testRedirectWithWrongProductId()
+    {
+        $quotaId = 1;
+        $productIdInQuota = 1;
+        $productIdInRequest = null;
+        $quoteItemMock = $this->getMockBuilder('Magento\Quote\Model\Quote\Item')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $quoteMock = $this->getMockBuilder('Magento\Quote\Model\Quote')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->requestMock->expects($this->at(0))
+            ->method('getParam')
+            ->with('id')
+            ->willReturn($quotaId);
+        $this->requestMock->expects($this->at(1))
+            ->method('getParam')
+            ->with('product_id')
+            ->willReturn($productIdInRequest);
+        $this->cartMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
+        $quoteMock->expects($this->once())->method('getItemById')->willReturn($quoteItemMock);
+        $quoteItemMock->expects($this->exactly(1))->method('getProduct')->willReturn($productMock);
+        $productMock->expects($this->exactly(1))->method('getId')->willReturn($productIdInQuota);
+        $this->messageManagerMock->expects($this->once())->method('addError');
+        $this->redirectMock->expects($this->once())->method('redirect')->with($this->responseMock, 'checkout/cart', []);
+        $this->configureController->execute();
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php
index 3a8f64727c33d0132c3e762bd8a9f810bf6179fb..b770464aa8d2a3008ab37c34ae5b3e9a987ca5db 100644
--- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php
+++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ByPercentTest.php
@@ -209,7 +209,7 @@ class ByPercentTest extends \PHPUnit_Framework_TestCase
                     'amount' => 42,
                     'baseAmount' => 25.5,
                     'originalAmount' => 51,
-                    'baseOriginalAmount' => 46.5,
+                    'baseOriginalAmount' => 34.5,
                 ],
             ]
         ];
diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php
index 7163d2680c9a3884baad59d89991cd902b20b35d..13bec6ff79e5a34f1369ae363e59c1d63822d8b3 100644
--- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php
+++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/ToPercentTest.php
@@ -209,7 +209,7 @@ class ToPercentTest extends \PHPUnit_Framework_TestCase
                     'amount' => 98,
                     'baseAmount' => 59.5,
                     'originalAmount' => 119,
-                    'baseOriginalAmount' => 108.5,
+                    'baseOriginalAmount' => 80.5,
                 ],
             ]
         ];
diff --git a/lib/web/mage/adminhtml/form.js b/lib/web/mage/adminhtml/form.js
index c6fed3aa5fc4f17ddda44a33da83d997ec122b8f..e266ece372ac4c8abda7a7b74b2b582eeffe1ed8 100644
--- a/lib/web/mage/adminhtml/form.js
+++ b/lib/web/mage/adminhtml/form.js
@@ -458,7 +458,7 @@ FormElementDependenceController.prototype = {
                 }
             } else {
                 $(idTo).show();
-                if (isAnInputOrSelect) {
+                if (isAnInputOrSelect && !isInheritCheckboxChecked) {
                     $(idTo).disabled = false;
                     jQuery('#' + idTo).removeClass('ignore-validate');
                 }