Magento 2 : Which view model or Observable pulls shipping address data on payment page?Magento 2 : From where (PHP) is the checkout billing address options drop down being populated?How is product data passed from a Block to knockout template?Magento2 : How to get guest email address after shipping address and before placeorder?Add a CSS class with Knockout JShow to remove shipping cost from magento2 checkout summeryMoving payment to shipping step in Magento 2Magento 2: How to call block/model method on a new custom checkout page?How to get checkout form data for logged in and guest customers in magento 2Shipping address changes to customer_address_entity data not from quote_address when refreshed on payment page Magento 2How to debug Magento 2 knockoutjs getRegion() bindingsForce quote_address instead of customer address when browser is refreshed Magento 2

Extreme, but not acceptable situation and I can't start the work tomorrow morning

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

Need help identifying/translating a plaque in Tangier, Morocco

Is Fable (1996) connected in any way to the Fable franchise from Lionhead Studios?

Are cabin dividers used to "hide" the flex of the airplane?

Is repealing the EU Withdrawal Act a precondition of revoking Article 50?

Calculate Levenshtein distance between two strings in Python

Is Social Media Science Fiction?

How would photo IDs work for shapeshifters?

Why does this relative pronoun not take the case of the noun it is referring to?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

What do the Banks children have against barley water?

System.XmlException: start tag unexpected character =

Shall I use personal or official e-mail account when registering to external websites for work purpose?

My colleague's body is amazing

Where to refill my bottle in India?

Doomsday-clock for my fantasy planet

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Lied on resume at previous job

Was there ever an axiom rendered a theorem?

Information to fellow intern about hiring?

LM317 - Calculate dissipation due to voltage drop

Does it makes sense to buy a cycle to learn riding?

Does the average primeness of natural numbers tend to zero?



Magento 2 : Which view model or Observable pulls shipping address data on payment page?


Magento 2 : From where (PHP) is the checkout billing address options drop down being populated?How is product data passed from a Block to knockout template?Magento2 : How to get guest email address after shipping address and before placeorder?Add a CSS class with Knockout JShow to remove shipping cost from magento2 checkout summeryMoving payment to shipping step in Magento 2Magento 2: How to call block/model method on a new custom checkout page?How to get checkout form data for logged in and guest customers in magento 2Shipping address changes to customer_address_entity data not from quote_address when refreshed on payment page Magento 2How to debug Magento 2 knockoutjs getRegion() bindingsForce quote_address instead of customer address when browser is refreshed Magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I see that following code from shipping-information template is used to display shipping address on checkout#payment page but unable to understand which Magento 2 PhP Model or knockout view model is getting this data. I know that this data comes from address tables but what I would like to understand is the middle man that's getting the data since I see the DB table and fronte-end code, but not the code that's fetching it.



<!-- ko foreach: getRegion('ship-to') -->
<!-- ko template: getTemplate() -->
<!--/ko-->
<!--/ko-->


Any clues gurus?



Alan Storm has a good to post to understand what's going on from shipping to payment page, which is very helpful in case anyone needs it.



Magento 2 checkout - Shipping to Payment










share|improve this question
























  • I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • cloudways.com/blog/knockoutjs-in-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

    – cnu
    Apr 1 at 13:58












  • Do you want to know how template binding works in general or its core implementation?

    – Vivek Kumar
    Apr 2 at 13:04











  • I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

    – cnu
    Apr 2 at 17:35

















2















I see that following code from shipping-information template is used to display shipping address on checkout#payment page but unable to understand which Magento 2 PhP Model or knockout view model is getting this data. I know that this data comes from address tables but what I would like to understand is the middle man that's getting the data since I see the DB table and fronte-end code, but not the code that's fetching it.



<!-- ko foreach: getRegion('ship-to') -->
<!-- ko template: getTemplate() -->
<!--/ko-->
<!--/ko-->


Any clues gurus?



Alan Storm has a good to post to understand what's going on from shipping to payment page, which is very helpful in case anyone needs it.



Magento 2 checkout - Shipping to Payment










share|improve this question
























  • I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • cloudways.com/blog/knockoutjs-in-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

    – cnu
    Apr 1 at 13:58












  • Do you want to know how template binding works in general or its core implementation?

    – Vivek Kumar
    Apr 2 at 13:04











  • I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

    – cnu
    Apr 2 at 17:35













2












2








2








I see that following code from shipping-information template is used to display shipping address on checkout#payment page but unable to understand which Magento 2 PhP Model or knockout view model is getting this data. I know that this data comes from address tables but what I would like to understand is the middle man that's getting the data since I see the DB table and fronte-end code, but not the code that's fetching it.



<!-- ko foreach: getRegion('ship-to') -->
<!-- ko template: getTemplate() -->
<!--/ko-->
<!--/ko-->


Any clues gurus?



Alan Storm has a good to post to understand what's going on from shipping to payment page, which is very helpful in case anyone needs it.



Magento 2 checkout - Shipping to Payment










share|improve this question
















I see that following code from shipping-information template is used to display shipping address on checkout#payment page but unable to understand which Magento 2 PhP Model or knockout view model is getting this data. I know that this data comes from address tables but what I would like to understand is the middle man that's getting the data since I see the DB table and fronte-end code, but not the code that's fetching it.



<!-- ko foreach: getRegion('ship-to') -->
<!-- ko template: getTemplate() -->
<!--/ko-->
<!--/ko-->


Any clues gurus?



Alan Storm has a good to post to understand what's going on from shipping to payment page, which is very helpful in case anyone needs it.



Magento 2 checkout - Shipping to Payment







magento2 checkout shipping knockoutjs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 5 at 5:30









Vivek Kumar

2,5872729




2,5872729










asked Mar 29 at 14:13









cnucnu

786




786












  • I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • cloudways.com/blog/knockoutjs-in-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

    – cnu
    Apr 1 at 13:58












  • Do you want to know how template binding works in general or its core implementation?

    – Vivek Kumar
    Apr 2 at 13:04











  • I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

    – cnu
    Apr 2 at 17:35

















  • I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • cloudways.com/blog/knockoutjs-in-magento-2

    – Chirag Patel
    Mar 30 at 12:15











  • Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

    – cnu
    Apr 1 at 13:58












  • Do you want to know how template binding works in general or its core implementation?

    – Vivek Kumar
    Apr 2 at 13:04











  • I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

    – cnu
    Apr 2 at 17:35
















I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

– Chirag Patel
Mar 30 at 12:15





I hope it helps! inviqa.com/blog/using-knockout-js-magento-2

– Chirag Patel
Mar 30 at 12:15













cloudways.com/blog/knockoutjs-in-magento-2

– Chirag Patel
Mar 30 at 12:15





cloudways.com/blog/knockoutjs-in-magento-2

– Chirag Patel
Mar 30 at 12:15













Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

– cnu
Apr 1 at 13:58






Thanks Chirag. I read through above posts and I do understand how knockoutjs bindings are working for given examples, but I don't see similar code for this Magento 2 scenario. Am I missing anything? Please comment if you know OOB Magento 2 code that's responsible for this since I couldn't find it.

– cnu
Apr 1 at 13:58














Do you want to know how template binding works in general or its core implementation?

– Vivek Kumar
Apr 2 at 13:04





Do you want to know how template binding works in general or its core implementation?

– Vivek Kumar
Apr 2 at 13:04













I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

– cnu
Apr 2 at 17:35





I would like to know where to find the implementation for 'ship-to' address view model code in OOB Magento 2.2.x code to fix a bug we have when displaying the shipping address.

– cnu
Apr 2 at 17:35










1 Answer
1






active

oldest

votes


















1














<!-- ko foreach: getRegion('ship-to') -->


invokes the following piece of code from checkout_index_index.xml layout file



<item name="displayArea" xsi:type="string">shipping-information</item>
<item name="children" xsi:type="array">
<item name="ship-to" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/shipping-information/list</item>
<item name="displayArea" xsi:type="string">ship-to</item>
</item>
</item>


It essentially asks to load uiComponent corresponding to the region i.e Magento_Checkout/js/view/shipping-information/list and loop and render through all its children.



<!-- ko template: getTemplate() -->


renders HTML templates corresponding to each component, you can know template for a uiComponent by looking into its code. For eg. for current uiComponent i.e
Magento_Checkout/view/frontend/web/js/view/shipping-address/list.js following code tells us that the template for it is Magento_Checkout/shipping-address/list.html located under view/frontend/web/template/shipping-address directory.



return Component.extend({
defaults:
template: 'Magento_Checkout/shipping-address/list',
visible: addressList().length > 0,
rendererTemplates: []
,


Please feel free to ask any questions.



EDIT :



All the addresses are maintained in a global js window object called customerData, if you specifically want to know how data is coming from php. This answer of mine might help.






share|improve this answer

























  • this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

    – cnu
    Apr 4 at 16:51











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267982%2fmagento-2-which-view-model-or-observable-pulls-shipping-address-data-on-paymen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














<!-- ko foreach: getRegion('ship-to') -->


invokes the following piece of code from checkout_index_index.xml layout file



<item name="displayArea" xsi:type="string">shipping-information</item>
<item name="children" xsi:type="array">
<item name="ship-to" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/shipping-information/list</item>
<item name="displayArea" xsi:type="string">ship-to</item>
</item>
</item>


It essentially asks to load uiComponent corresponding to the region i.e Magento_Checkout/js/view/shipping-information/list and loop and render through all its children.



<!-- ko template: getTemplate() -->


renders HTML templates corresponding to each component, you can know template for a uiComponent by looking into its code. For eg. for current uiComponent i.e
Magento_Checkout/view/frontend/web/js/view/shipping-address/list.js following code tells us that the template for it is Magento_Checkout/shipping-address/list.html located under view/frontend/web/template/shipping-address directory.



return Component.extend({
defaults:
template: 'Magento_Checkout/shipping-address/list',
visible: addressList().length > 0,
rendererTemplates: []
,


Please feel free to ask any questions.



EDIT :



All the addresses are maintained in a global js window object called customerData, if you specifically want to know how data is coming from php. This answer of mine might help.






share|improve this answer

























  • this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

    – cnu
    Apr 4 at 16:51















1














<!-- ko foreach: getRegion('ship-to') -->


invokes the following piece of code from checkout_index_index.xml layout file



<item name="displayArea" xsi:type="string">shipping-information</item>
<item name="children" xsi:type="array">
<item name="ship-to" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/shipping-information/list</item>
<item name="displayArea" xsi:type="string">ship-to</item>
</item>
</item>


It essentially asks to load uiComponent corresponding to the region i.e Magento_Checkout/js/view/shipping-information/list and loop and render through all its children.



<!-- ko template: getTemplate() -->


renders HTML templates corresponding to each component, you can know template for a uiComponent by looking into its code. For eg. for current uiComponent i.e
Magento_Checkout/view/frontend/web/js/view/shipping-address/list.js following code tells us that the template for it is Magento_Checkout/shipping-address/list.html located under view/frontend/web/template/shipping-address directory.



return Component.extend({
defaults:
template: 'Magento_Checkout/shipping-address/list',
visible: addressList().length > 0,
rendererTemplates: []
,


Please feel free to ask any questions.



EDIT :



All the addresses are maintained in a global js window object called customerData, if you specifically want to know how data is coming from php. This answer of mine might help.






share|improve this answer

























  • this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

    – cnu
    Apr 4 at 16:51













1












1








1







<!-- ko foreach: getRegion('ship-to') -->


invokes the following piece of code from checkout_index_index.xml layout file



<item name="displayArea" xsi:type="string">shipping-information</item>
<item name="children" xsi:type="array">
<item name="ship-to" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/shipping-information/list</item>
<item name="displayArea" xsi:type="string">ship-to</item>
</item>
</item>


It essentially asks to load uiComponent corresponding to the region i.e Magento_Checkout/js/view/shipping-information/list and loop and render through all its children.



<!-- ko template: getTemplate() -->


renders HTML templates corresponding to each component, you can know template for a uiComponent by looking into its code. For eg. for current uiComponent i.e
Magento_Checkout/view/frontend/web/js/view/shipping-address/list.js following code tells us that the template for it is Magento_Checkout/shipping-address/list.html located under view/frontend/web/template/shipping-address directory.



return Component.extend({
defaults:
template: 'Magento_Checkout/shipping-address/list',
visible: addressList().length > 0,
rendererTemplates: []
,


Please feel free to ask any questions.



EDIT :



All the addresses are maintained in a global js window object called customerData, if you specifically want to know how data is coming from php. This answer of mine might help.






share|improve this answer















<!-- ko foreach: getRegion('ship-to') -->


invokes the following piece of code from checkout_index_index.xml layout file



<item name="displayArea" xsi:type="string">shipping-information</item>
<item name="children" xsi:type="array">
<item name="ship-to" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/shipping-information/list</item>
<item name="displayArea" xsi:type="string">ship-to</item>
</item>
</item>


It essentially asks to load uiComponent corresponding to the region i.e Magento_Checkout/js/view/shipping-information/list and loop and render through all its children.



<!-- ko template: getTemplate() -->


renders HTML templates corresponding to each component, you can know template for a uiComponent by looking into its code. For eg. for current uiComponent i.e
Magento_Checkout/view/frontend/web/js/view/shipping-address/list.js following code tells us that the template for it is Magento_Checkout/shipping-address/list.html located under view/frontend/web/template/shipping-address directory.



return Component.extend({
defaults:
template: 'Magento_Checkout/shipping-address/list',
visible: addressList().length > 0,
rendererTemplates: []
,


Please feel free to ask any questions.



EDIT :



All the addresses are maintained in a global js window object called customerData, if you specifically want to know how data is coming from php. This answer of mine might help.







share|improve this answer














share|improve this answer



share|improve this answer








edited 12 hours ago

























answered Apr 4 at 13:13









Vivek KumarVivek Kumar

2,5872729




2,5872729












  • this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

    – cnu
    Apr 4 at 16:51

















  • this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

    – cnu
    Apr 4 at 16:51
















this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

– cnu
Apr 4 at 16:51





this is great information, I kind of got it but my understanding is much better now. At the end what I am trying to understand is the helper or Block that's getting 'ship-to' address information from the DB. Any idea on which code is doing in OOB Magento 2 code?

– cnu
Apr 4 at 16:51

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267982%2fmagento-2-which-view-model-or-observable-pulls-shipping-address-data-on-paymen%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api

Magento2 - How to hide price filter only in specific categories?Multiselect price filter attribute in layered navigationhide only some categories from layered navigation in magentoRemove Price Filter on certain categoriescustomize layered price filter?Hide Price for a particular customer groupPrice filter in layered navigation not working correctly with price including tax in magento 2.2.3Magento 2 how to hide attribute at Layered navigation?Magento 2. how to hide price only for specific categoriesMagento 2 How can I hide the price and total from cart and checkout summary?Magento2: Can we add navigation layered filter like price filter for other attribute?