Shopp Support » Design

Design

Print out customer details without input wraps

  1. totomobile

    Profile

    Hi I wondering how you can get the customer information like first and last name and email and just print it as text instead of in inputs. I'd like to do this on the account "dashboard" and have a link to edit this.

    ie.
    <?php shopp('customer','firstname'); ?>

    but just text.

    Thanks

    Posted 8 months ago — #

  2. totomobile

    Profile

    Sorry to have to bump, but is there really no way to get just the plain customer information without the input tag?? All i want to do is say "Welcome back -customer name- see your account information here" and I can't do this?

    Posted 8 months ago — #

  3. gyokushin

    • Verified

    Profile

    Just noticed this too, and i can't find anything in the API either. However, you can use a Regular Expression to pull out the value of the text box, and that seems to work fine.

    <?php
    $name = shopp('customer','firstname','return=true');
    preg_match("/value=\"(.*?)\"/", $name, $matches);
    echo $matches[1];
    ?>

    Posted 7 months ago — #

  4. totomobile

    Profile

    Wow this is tricky! It'l have to do until the functionality is added later I suppose. Thanks!

    Posted 7 months ago — #


Reply

You must log in to post.