Skip to content

Commit

Permalink
Merge pull request magento#802 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Feb 4, 2017
2 parents 1e9377a + 5582d1d commit 061977e
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,33 @@ class VaultDetailsHandler implements HandlerInterface
*/
protected $config;

/**
* @var \Magento\Framework\Serialize\SerializerInterface
*/
private $serializer;

/**
* Constructor
*
* @param PaymentTokenInterfaceFactory $paymentTokenFactory
* @param OrderPaymentExtensionInterfaceFactory $paymentExtensionFactory
* @param Config $config
* @param SubjectReader $subjectReader
* @param \Magento\Framework\Serialize\SerializerInterface $serializer
*/
public function __construct(
PaymentTokenInterfaceFactory $paymentTokenFactory,
OrderPaymentExtensionInterfaceFactory $paymentExtensionFactory,
Config $config,
SubjectReader $subjectReader
SubjectReader $subjectReader,
\Magento\Framework\Serialize\SerializerInterface $serializer = null
) {
$this->paymentTokenFactory = $paymentTokenFactory;
$this->paymentExtensionFactory = $paymentExtensionFactory;
$this->config = $config;
$this->subjectReader = $subjectReader;
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
->get(\Magento\Framework\Serialize\SerializerInterface::class);
}

/**
Expand Down Expand Up @@ -133,7 +142,7 @@ private function getExpirationDate(Transaction $transaction)
*/
private function convertDetailsToJSON($details)
{
$json = \Zend_Json::encode($details);
$json = $this->serializer->serialize($details);
return $json ? $json : '{}';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,20 @@ protected function setUp()
->method('getCctypesMapper')
->willReturn($mapperArray);

$this->serializer = $this->getMock(
\Magento\Framework\Serialize\SerializerInterface::class,
[],
[],
'',
false
);

$this->paymentHandler = new VaultDetailsHandler(
$this->paymentTokenFactory,
$this->paymentExtensionFactory,
$this->config,
$this->subjectReader
$this->subjectReader,
$this->serializer
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="shipment_items">
<block class="Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer" as="bundle" template="sales/shipment/view/items/renderer.phtml"/>
<block class="Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer" name="shipment_item_bundle" as="shipment_item_bundle" template="sales/shipment/view/items/renderer.phtml"/>
</referenceBlock>
</body>
</page>
1 change: 1 addition & 0 deletions app/code/Magento/Customer/etc/frontend/sections.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<action name="customer/account/logout"/>
<action name="customer/account/loginPost"/>
<action name="customer/account/createPost"/>
<action name="customer/account/editPost"/>
<action name="customer/ajax/login">
<section name="checkout-data"/>
<section name="cart"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="Magento_Sales::order/view/info.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
<block class="Magento\Shipping\Block\Adminhtml\Create\Items" name="order_items" template="create/items.phtml">
<block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="Magento_Shipping::create/items/renderer/default.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" name="shipment_item_default" as="shipment_item_default" template="Magento_Shipping::create/items/renderer/default.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="Magento_Sales::items/column/qty.phtml" group="column"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="Magento_Sales::items/column/name.phtml" group="column"/>
<block class="Magento\Framework\View\Element\Text\ListText" name="order_item_extra_info"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="Magento_Sales::order/view/info.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
<block class="Magento\Shipping\Block\Adminhtml\View\Items" name="shipment_items" template="view/items.phtml">
<block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="Magento_Shipping::view/items/renderer/default.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" name="shipment_item_default" as="shipment_item_default" template="Magento_Shipping::view/items/renderer/default.phtml"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="Magento_Sales::items/column/qty.phtml" group="column"/>
<block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="Magento_Sales::items/column/name.phtml" group="column"/>
<block class="Magento\Framework\View\Element\Text\ListText" name="order_item_extra_info"/>
Expand Down
5 changes: 5 additions & 0 deletions app/code/Magento/Ui/view/base/web/js/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ define([
}
break;

case 'select-multiple':
var name = item.name.substring(0,(item.name.length - 2)); //remove [] from the name ending
result[name] = _.pluck(item.selectedOptions, 'value');
break;

default:
result[item.name] = item.value;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"colinmollenhour/cache-backend-redis": "1.9",
"colinmollenhour/cache-backend-file": "1.4",
"composer/composer": "1.0.0-beta1",
"monolog/monolog": "1.16.0",
"monolog/monolog": "^1.17",
"oyejorge/less.php": "~1.7.0",
"pelago/emogrifier": "0.1.1",
"tubalmartin/cssmin": "2.4.8-p4",
Expand Down
30 changes: 16 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 061977e

Please sign in to comment.