Is there any reason why this will not work?
Posted: Tue Feb 01, 2022 2:53 pm
Using Phoenix 1.0.7 9
I had a customer email this week, with a suggestion to make things easier for them when searching through their old order history. He logged in to his account, found the order but had trouble finding the product that he was looking for as he wanted to order more. He only had the model number as that was on the package we sent him.
It was suggested by the customer that in the order history section the product details should/could show the model number. For now I have altered the code on the page as follows
Added to one section in the order_info_history.php so it looks like this
I have tested this and all looks fine, but can anyone see a reason why this may not work.
I had a customer email this week, with a suggestion to make things easier for them when searching through their old order history. He logged in to his account, found the order but had trouble finding the product that he was looking for as he wanted to order more. He only had the model number as that was on the package we sent him.
It was suggested by the customer that in the order history section the product details should/could show the model number. For now I have altered the code on the page as follows
Added to one section in the order_info_history.php so it looks like this
Code: Select all
<div class="row">
<div class="col-sm-7">
<table class="table table-hover table-bordered">
<thead class="thead-dark">
<tr>
<th colspan="3"><?php echo HEADING_PRODUCTS; ?></th>
<?php
if (count($order->info['tax_groups']) > 1) {
?>
<th class="text-right"><?php echo HEADING_TAX; ?></th>
<?php
}
?>
<th class="text-right"><?php echo HEADING_TOTAL; ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($order->products as $product) {
echo '<tr>';
echo '<td align="right" width="30">' . $product['qty'] . '</td>';
echo '<td>' . $product['model'] . '</td>';
echo '<td>' . $product['name'];
foreach (($product['attributes'] ?? []) as $attribute) {
echo '<br><small><i> - ' . $attribute['option'] . ': ' . $attribute['value'] . '</i></small>';
}
echo '</td>';