Skip to content

Commit 493bd49

Browse files
author
Oleksii Korshenko
authored
MAGETWO-68877: Issue #7988 Typo changed also added comments for each index, getters and setters. #9484
2 parents c6d02c1 + 96f894b commit 493bd49

File tree

1 file changed

+48
-8
lines changed

1 file changed

+48
-8
lines changed

app/code/Magento/Checkout/view/frontend/web/js/checkout-data.js

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ define([
3131

3232
if ($.isEmptyObject(data)) {
3333
data = {
34-
'selectedShippingAddress': null,
35-
'shippingAddressFromData': null,
36-
'newCustomerShippingAddress': null,
37-
'selectedShippingRate': null,
38-
'selectedPaymentMethod': null,
39-
'selectedBillingAddress': null,
40-
'billingAddressFormData': null,
41-
'newCustomerBillingAddress': null
34+
'selectedShippingAddress': null, //Selected shipping address pulled from persistence storage
35+
'shippingAddressFromData': null, //Shipping address pulled from persistence storage
36+
'newCustomerShippingAddress': null, //Shipping address pulled from persistence storage for customer
37+
'selectedShippingRate': null, //Shipping rate pulled from persistence storage
38+
'selectedPaymentMethod': null, //Payment method pulled from persistence storage
39+
'selectedBillingAddress': null, //Selected billing address pulled from persistence storage
40+
'billingAddressFromData': null, //Billing address pulled from persistence storage
41+
'newCustomerBillingAddress': null //Billing address pulled from persistence storage for new customer
4242
};
4343
saveData(data);
4444
}
@@ -48,6 +48,8 @@ define([
4848

4949
return {
5050
/**
51+
* Setting the selected shipping address pulled from persistence storage
52+
*
5153
* @param {Object} data
5254
*/
5355
setSelectedShippingAddress: function (data) {
@@ -58,13 +60,17 @@ define([
5860
},
5961

6062
/**
63+
* Pulling the selected shipping address from persistence storage
64+
*
6165
* @return {*}
6266
*/
6367
getSelectedShippingAddress: function () {
6468
return getData().selectedShippingAddress;
6569
},
6670

6771
/**
72+
* Setting the shipping address pulled from persistence storage
73+
*
6874
* @param {Object} data
6975
*/
7076
setShippingAddressFromData: function (data) {
@@ -75,13 +81,17 @@ define([
7581
},
7682

7783
/**
84+
* Pulling the shipping address from persistence storage
85+
*
7886
* @return {*}
7987
*/
8088
getShippingAddressFromData: function () {
8189
return getData().shippingAddressFromData;
8290
},
8391

8492
/**
93+
* Setting the shipping address pulled from persistence storage for new customer
94+
*
8595
* @param {Object} data
8696
*/
8797
setNewCustomerShippingAddress: function (data) {
@@ -92,13 +102,17 @@ define([
92102
},
93103

94104
/**
105+
* Pulling the shipping address from persistence storage for new customer
106+
*
95107
* @return {*}
96108
*/
97109
getNewCustomerShippingAddress: function () {
98110
return getData().newCustomerShippingAddress;
99111
},
100112

101113
/**
114+
* Setting the selected shipping rate pulled from persistence storage
115+
*
102116
* @param {Object} data
103117
*/
104118
setSelectedShippingRate: function (data) {
@@ -109,13 +123,17 @@ define([
109123
},
110124

111125
/**
126+
* Pulling the selected shipping rate from local storage
127+
*
112128
* @return {*}
113129
*/
114130
getSelectedShippingRate: function () {
115131
return getData().selectedShippingRate;
116132
},
117133

118134
/**
135+
* Setting the selected payment method pulled from persistence storage
136+
*
119137
* @param {Object} data
120138
*/
121139
setSelectedPaymentMethod: function (data) {
@@ -126,13 +144,17 @@ define([
126144
},
127145

128146
/**
147+
* Pulling the payment method from persistence storage
148+
*
129149
* @return {*}
130150
*/
131151
getSelectedPaymentMethod: function () {
132152
return getData().selectedPaymentMethod;
133153
},
134154

135155
/**
156+
* Setting the selected billing address pulled from persistence storage
157+
*
136158
* @param {Object} data
137159
*/
138160
setSelectedBillingAddress: function (data) {
@@ -143,13 +165,17 @@ define([
143165
},
144166

145167
/**
168+
* Pulling the selected billing address from persistence storage
169+
*
146170
* @return {*}
147171
*/
148172
getSelectedBillingAddress: function () {
149173
return getData().selectedBillingAddress;
150174
},
151175

152176
/**
177+
* Setting the billing address pulled from persistence storage
178+
*
153179
* @param {Object} data
154180
*/
155181
setBillingAddressFromData: function (data) {
@@ -160,13 +186,17 @@ define([
160186
},
161187

162188
/**
189+
* Pulling the billing address from persistence storage
190+
*
163191
* @return {*}
164192
*/
165193
getBillingAddressFromData: function () {
166194
return getData().billingAddressFromData;
167195
},
168196

169197
/**
198+
* Setting the billing address pulled from persistence storage for new customer
199+
*
170200
* @param {Object} data
171201
*/
172202
setNewCustomerBillingAddress: function (data) {
@@ -177,13 +207,17 @@ define([
177207
},
178208

179209
/**
210+
* Pulling the billing address from persistence storage for new customer
211+
*
180212
* @return {*}
181213
*/
182214
getNewCustomerBillingAddress: function () {
183215
return getData().newCustomerBillingAddress;
184216
},
185217

186218
/**
219+
* Pulling the email address from persistence storage
220+
*
187221
* @return {*}
188222
*/
189223
getValidatedEmailValue: function () {
@@ -193,6 +227,8 @@ define([
193227
},
194228

195229
/**
230+
* Setting the email address pulled from persistence storage
231+
*
196232
* @param {String} email
197233
*/
198234
setValidatedEmailValue: function (email) {
@@ -203,6 +239,8 @@ define([
203239
},
204240

205241
/**
242+
* Pulling the email input field value from persistence storage
243+
*
206244
* @return {*}
207245
*/
208246
getInputFieldEmailValue: function () {
@@ -212,6 +250,8 @@ define([
212250
},
213251

214252
/**
253+
* Setting the email input field value pulled from persistence storage
254+
*
215255
* @param {String} email
216256
*/
217257
setInputFieldEmailValue: function (email) {

0 commit comments

Comments
 (0)