Skip to content

Commit

Permalink
Merge pull request #1187 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#9922
#9484
  • Loading branch information
Oleksii Korshenko authored Jun 13, 2017
2 parents e2feb2e + 493bd49 commit 0aa7656
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 11 deletions.
56 changes: 48 additions & 8 deletions app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ define([

if ($.isEmptyObject(data)) {
data = {
'selectedShippingAddress': null,
'shippingAddressFromData': null,
'newCustomerShippingAddress': null,
'selectedShippingRate': null,
'selectedPaymentMethod': null,
'selectedBillingAddress': null,
'billingAddressFormData': null,
'newCustomerBillingAddress': null
'selectedShippingAddress': null, //Selected shipping address pulled from persistence storage
'shippingAddressFromData': null, //Shipping address pulled from persistence storage
'newCustomerShippingAddress': null, //Shipping address pulled from persistence storage for customer
'selectedShippingRate': null, //Shipping rate pulled from persistence storage
'selectedPaymentMethod': null, //Payment method pulled from persistence storage
'selectedBillingAddress': null, //Selected billing address pulled from persistence storage
'billingAddressFromData': null, //Billing address pulled from persistence storage
'newCustomerBillingAddress': null //Billing address pulled from persistence storage for new customer
};
saveData(data);
}
Expand All @@ -48,6 +48,8 @@ define([

return {
/**
* Setting the selected shipping address pulled from persistence storage
*
* @param {Object} data
*/
setSelectedShippingAddress: function (data) {
Expand All @@ -58,13 +60,17 @@ define([
},

/**
* Pulling the selected shipping address from persistence storage
*
* @return {*}
*/
getSelectedShippingAddress: function () {
return getData().selectedShippingAddress;
},

/**
* Setting the shipping address pulled from persistence storage
*
* @param {Object} data
*/
setShippingAddressFromData: function (data) {
Expand All @@ -75,13 +81,17 @@ define([
},

/**
* Pulling the shipping address from persistence storage
*
* @return {*}
*/
getShippingAddressFromData: function () {
return getData().shippingAddressFromData;
},

/**
* Setting the shipping address pulled from persistence storage for new customer
*
* @param {Object} data
*/
setNewCustomerShippingAddress: function (data) {
Expand All @@ -92,13 +102,17 @@ define([
},

/**
* Pulling the shipping address from persistence storage for new customer
*
* @return {*}
*/
getNewCustomerShippingAddress: function () {
return getData().newCustomerShippingAddress;
},

/**
* Setting the selected shipping rate pulled from persistence storage
*
* @param {Object} data
*/
setSelectedShippingRate: function (data) {
Expand All @@ -109,13 +123,17 @@ define([
},

/**
* Pulling the selected shipping rate from local storage
*
* @return {*}
*/
getSelectedShippingRate: function () {
return getData().selectedShippingRate;
},

/**
* Setting the selected payment method pulled from persistence storage
*
* @param {Object} data
*/
setSelectedPaymentMethod: function (data) {
Expand All @@ -126,13 +144,17 @@ define([
},

/**
* Pulling the payment method from persistence storage
*
* @return {*}
*/
getSelectedPaymentMethod: function () {
return getData().selectedPaymentMethod;
},

/**
* Setting the selected billing address pulled from persistence storage
*
* @param {Object} data
*/
setSelectedBillingAddress: function (data) {
Expand All @@ -143,13 +165,17 @@ define([
},

/**
* Pulling the selected billing address from persistence storage
*
* @return {*}
*/
getSelectedBillingAddress: function () {
return getData().selectedBillingAddress;
},

/**
* Setting the billing address pulled from persistence storage
*
* @param {Object} data
*/
setBillingAddressFromData: function (data) {
Expand All @@ -160,13 +186,17 @@ define([
},

/**
* Pulling the billing address from persistence storage
*
* @return {*}
*/
getBillingAddressFromData: function () {
return getData().billingAddressFromData;
},

/**
* Setting the billing address pulled from persistence storage for new customer
*
* @param {Object} data
*/
setNewCustomerBillingAddress: function (data) {
Expand All @@ -177,13 +207,17 @@ define([
},

/**
* Pulling the billing address from persistence storage for new customer
*
* @return {*}
*/
getNewCustomerBillingAddress: function () {
return getData().newCustomerBillingAddress;
},

/**
* Pulling the email address from persistence storage
*
* @return {*}
*/
getValidatedEmailValue: function () {
Expand All @@ -193,6 +227,8 @@ define([
},

/**
* Setting the email address pulled from persistence storage
*
* @param {String} email
*/
setValidatedEmailValue: function (email) {
Expand All @@ -203,6 +239,8 @@ define([
},

/**
* Pulling the email input field value from persistence storage
*
* @return {*}
*/
getInputFieldEmailValue: function () {
Expand All @@ -212,6 +250,8 @@ define([
},

/**
* Setting the email input field value pulled from persistence storage
*
* @param {String} email
*/
setInputFieldEmailValue: function (email) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ abstract class AbstractFrontend implements \Magento\Eav\Model\Entity\Attribute\F
* @param CacheInterface $cache
* @param $storeResolver @deprecated
* @param array $cacheTags
* @param Serializer $serializer
* @param StoreManagerInterface $storeManager
* @param Serializer $serializer
* @codeCoverageIgnore
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
Expand All @@ -78,8 +78,8 @@ public function __construct(
CacheInterface $cache = null,
$storeResolver = null,
array $cacheTags = null,
Serializer $serializer = null,
StoreManagerInterface $storeManager = null
StoreManagerInterface $storeManager = null,
Serializer $serializer = null
) {
$this->_attrBooleanFactory = $attrBooleanFactory;
$this->cache = $cache ?: ObjectManager::getInstance()->get(CacheInterface::class);
Expand Down

0 comments on commit 0aa7656

Please sign in to comment.