Use address from profile model on cart page

Slack Notes May 25th 2019

  • Fetch the address from the profile model. This is a singleton object.
  • Access this instance anywhere in a view by adding a profile model as a dependency.
  • Check the condition whether the user is logged In or not.
  • After logged In and try to use below-attached line in the browser dev tools and you will able to see the country that is fetching from the model.
  • SC._applications.Shopping._layoutInstance.currentView.model.attributes.addresses.models[0].attributes.country;

Leave a comment

Your email address will not be published. Required fields are marked *