<commit_before><?php
defined('C5_EXECUTE') or die("Access Denied.");
use \Concrete\Package\CommunityStore\Src\CommunityStore\Utilities\Price as Price;
use \Concrete\Package\CommunityStore\Src\Attribute\Key\StoreOrderKey as StoreOrderKey;

?>
<link href="/concrete/css/app.css" rel="stylesheet" type="text/css" media="all">
<div class="ccm-ui">
    <div class="container">
        <h3><?= t("Customer Overview") ?></h3>
        <hr>

        <div class="row">
            <div class="col-xs-12">
                <?php $orderemail = $order->getAttribute("email");

                if ($orderemail) { ?>
                    <h4><?= t("Email") ?></h4>
                    <p><a href="mailto:<?= $order->getAttribute("email"); ?>"><?= $order->getAttribute("email"); ?></a>
                    </p>
                <?php } ?>

                <?php
                $ui = UserInfo::getByID($order->getCustomerID());
                if ($ui) { ?>
                    <h4><?= t("User") ?></h4>
                    <p>
                        <a href="<?= \URL::to('/dashboard/users/search/view/' . $ui->getUserID()); ?>"><?= $ui->getUserName(); ?></a>
                    </p>
                <?php } ?>
            </div>

            <div class="col-xs-6">
                <h4><?= t("Billing Information") ?></h4>

                <p>
                    <?= $order->getAttribute("billing_first_name") . " " . $order->getAttribute("billing_last_name") ?>
                    <br>
                    <?= $order->getAttributeValueObject(StoreOrderKey::getByHandle('billing_address'))->getValue('displaySanitized', 'display'); ?>
                    <br/> <br/><?= t('Phone'); ?>: <?= $order->getAttribute("billing_phone") ?>
                </p>
            </div>
            <div class="col-xs-6">
                <?php if ($order->getAttribute("shipping_address")->address1) { ?>
                    <h4><?= t("Shipping Information") ?></h4>
                    <p>
                        <?= $order->getAttribute("shipping_first_name") . " " . $order->getAttribute("shipping_last_name") ?>
                        <br>
                        <?= $order->getAttributeValueObject(StoreOrderKey::getByHandle('shipping_address'))->getValue('displaySanitized', 'display'); ?>
                    </p>
                <?php } ?>
            </div>

            <?php if ($orderChoicesEnabled) { ?>
                <div class="col-xs-12">
                    <h4><?= t("Other Choices")?></h4>
                    <?php foreach ($orderChoicesAttList as $ak) { ?>
                        <label><?= $ak->getAttributeKeyDisplayName()?></label>
                        <p><?php echo "hej"; ?>
                            <?php echo $order->getAttributeValueObject(StoreOrderKey::getByHandle($ak->getAttributeKeyHandle()))->getValue(); ?>
                            <?php // echo $order->getAttributeValueObject(StoreOrderKey::getByHandle($ak->getAttributeKeyHandle()))->getValue(); ?>
                        </p>
                    <?php } ?>
                </div>
            <?php } ?>

        </div>

        <h3><?= t("Order Info") ?></h3>
        <hr>
        <table class="table table-striped">
            <thead>
            <tr>
                <th><strong><?= t("Product Name") ?></strong></th>
                <th><?= t("Product Options") ?></th>
                <th><?= t("Price") ?></th>
                <th><?= t("Quantity") ?></th>
                <th><?= t("Subtotal") ?></th>
            </tr><commit_msg>Cleaned up some debug code.<commit_after><?php
defined('C5_EXECUTE') or die("Access Denied.");
use \Concrete\Package\CommunityStore\Src\CommunityStore\Utilities\Price as Price;
use \Concrete\Package\CommunityStore\Src\Attribute\Key\StoreOrderKey as StoreOrderKey;

?>
<link href="/concrete/css/app.css" rel="stylesheet" type="text/css" media="all">
<div class="ccm-ui">
    <div class="container">
        <h3><?= t("Customer Overview") ?></h3>
        <hr>

        <div class="row">
            <div class="col-xs-12">
                <?php $orderemail = $order->getAttribute("email");

                if ($orderemail) { ?>
                    <h4><?= t("Email") ?></h4>
                    <p><a href="mailto:<?= $order->getAttribute("email"); ?>"><?= $order->getAttribute("email"); ?></a>
                    </p>
                <?php } ?>

                <?php
                $ui = UserInfo::getByID($order->getCustomerID());
                if ($ui) { ?>
                    <h4><?= t("User") ?></h4>
                    <p>
                        <a href="<?= \URL::to('/dashboard/users/search/view/' . $ui->getUserID()); ?>"><?= $ui->getUserName(); ?></a>
                    </p>
                <?php } ?>
            </div>

            <div class="col-xs-6">
                <h4><?= t("Billing Information") ?></h4>

                <p>
                    <?= $order->getAttribute("billing_first_name") . " " . $order->getAttribute("billing_last_name") ?>
                    <br>
                    <?= $order->getAttributeValueObject(StoreOrderKey::getByHandle('billing_address'))->getValue('displaySanitized', 'display'); ?>
                    <br/> <br/><?= t('Phone'); ?>: <?= $order->getAttribute("billing_phone") ?>
                </p>
            </div>
            <div class="col-xs-6">
                <?php if ($order->getAttribute("shipping_address")->address1) { ?>
                    <h4><?= t("Shipping Information") ?></h4>
                    <p>
                        <?= $order->getAttribute("shipping_first_name") . " " . $order->getAttribute("shipping_last_name") ?>
                        <br>
                        <?= $order->getAttributeValueObject(StoreOrderKey::getByHandle('shipping_address'))->getValue('displaySanitized', 'display'); ?>
                    </p>
                <?php } ?>
            </div>

            <?php if ($orderChoicesEnabled) { ?>
                <div class="col-xs-12">
                    <h4><?= t("Other Choices")?></h4>
                    <?php foreach ($orderChoicesAttList as $ak) { ?>
                        <label><?= $ak->getAttributeKeyDisplayName()?></label>
                        <p><?php echo $order->getAttributeValueObject(StoreOrderKey::getByHandle($ak->getAttributeKeyHandle()))->getValue(); ?></p>
                    <?php } ?>
                </div>
            <?php } ?>

        </div>

        <h3><?= t("Order Info") ?></h3>
        <hr>
        <table class="table table-striped">
            <thead>
            <tr>
                <th><strong><?= t("Product Name") ?></strong></th>
                <th><?= t("Product Options") ?></th>
                <th><?= t("Price") ?></th>
                <th><?= t("Quantity") ?></th>
                <th><?= t("Subtotal") ?></th>
            </tr>
{'fraction_non_alphanumeric': 0.20102639296187683, 'fraction_numerical': 0.0064516129032258064, 'mean_word_length': 1.6124090386824972, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 250, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2096006', 'n_tokens_mistral': 1966, 'n_tokens_neox': 1953, 'n_words': 311}