Guest User

Untitled

a guest
Jul 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. define([
  2. "jquery",
  3. "ko",
  4. "uiComponent",
  5. "Magento_Customer/js/customer-data"
  6. ], function ($, ko, Component, customerData) {
  7. var self = {
  8. initialize: function () {
  9. this._super();
  10. var checkoutData = customerData.get('checkout-data')();
  11. checkoutData.shippingAddressFromData = {
  12. firstname: 'your firstname',
  13. lastname: 'your lastname',
  14. company: 'your company',
  15. street: { 0: 'street line 1', 1: 'street line 2' },
  16. city: 'your city',
  17. postcode: 'your postcode',
  18. region: 'region name',
  19. region_id: 'region ID of dropdown',
  20. country_id: 'US',
  21. fax: '1112223333',
  22. telephone: '4445556666'
  23. };
  24. customerData.set('checkout-data', checkoutData);
  25. }
  26. };
  27. return Component.extend(self);
  28. });
Add Comment
Please, Sign In to add comment