Forum
Get addresses assigned to cart just before payment
Hi,
I'm trying to display the addresses chosen on a final confirmation page before going off to Paypal with an option that the customer can go back to the stage where they choose their address for the current cart. Is it possible to get the ids of the addresses associated with the cart once perch_shop_addresses_set() is returning true?
Many thanks, Paul
The billing and shipping addresses are held in the cart, so you can call
perch_shop_cart()
with theskip-template
option to get all that back.Hi, thanks for your reply. I had tried that but couldn't see the elements that hold the addresses (or references to them). Here is what I get returned from $cartinfo = perch_shop_cart(['skip-template' => true,]); :
Hmm. I thought they were included at that point. If not, then I'm not sure what the next step is.
I've stepped through the perch_shop_checkout() function and that is getting the addresses from the database in addresses_are_set() in the shop runtime.