Forum

Thread tagged as: Question, Shop

Shop Address Selection

Hi Drew,

I'd like to display perch_shop_order_address_form(); for existing customers with addresses to select from. However, I would like to display something different for a first-time customer who has never entered an address before.

I'm just not sure how to test for "has an address on file."

Thanks very much!!

Olympia Kyriakides

Olympia Kyriakides 1 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What does perch_shop_customer_addresses() return?

Success!!

<?php
    if (perch_shop_customer_addresses(array('skip-template' => 'true'))) {

    perch_shop_order_address_form();


    } else { echo 'something else'; }

?>