Page 1 of 1

Is there any reason why this will not work?

Posted: Tue Feb 01, 2022 2:53 pm
by 14Steve14
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

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>';
I have tested this and all looks fine, but can anyone see a reason why this may not work.
Untitled.png

Re: Is there any reason why this will not work?

Posted: Tue Feb 01, 2022 5:42 pm
by raiwa
I have an Addon which adds product image and a link to the product page to the order history. It’s commercial, but maybe you are interested.
https://phoenixcart.org/forum/app.php/ ... ce_orders/

Re: Is there any reason why this will not work?

Posted: Tue Feb 01, 2022 6:24 pm
by 14Steve14
raiwa wrote: Tue Feb 01, 2022 5:42 pm I have an Addon which adds product image and a link to the product page to the order history. It’s commercial, but maybe you are interested.
https://phoenixcart.org/forum/app.php/ ... ce_orders/
I am in the process of updating the store so will take a look. This is really just a hack to keep the old site ticking over with a few trials to see how it goes. This was a customer suggestion so will look into your addon.

Re: Is there any reason why this will not work?

Posted: Tue Feb 01, 2022 9:03 pm
by burt
Does the search facility ()advanced_search) search on products_model ? I don't recall if it does or not.

I vaguely recall adding the ability to search keywords, which may or may not do the job..

Re: Is there any reason why this will not work?

Posted: Tue Feb 01, 2022 9:29 pm
by Kofod95
burt wrote: Tue Feb 01, 2022 9:03 pm Does the search facility ()advanced_search) search on products_model ?
Searching "APP-1" on a clean 1.0.8.9 returns "Green Apples" (GAPP-1) and "Shiny Red Apples" (APP-1), so I guess yes - assuming I understood your question right

//Daniel

Re: Is there any reason why this will not work?

Posted: Wed Feb 02, 2022 5:23 pm
by ReneH4
I just bought and installed this Add-On, I love it!

Thanks again Rainer!
raiwa wrote: Tue Feb 01, 2022 5:42 pm I have an Addon which adds product image and a link to the product page to the order history. It’s commercial, but maybe you are interested.
https://phoenixcart.org/forum/app.php/ ... ce_orders/

Re: Is there any reason why this will not work?

Posted: Sat Feb 05, 2022 12:06 pm
by 14Steve14
burt wrote: Tue Feb 01, 2022 9:03 pm Does the search facility ()advanced_search) search on products_model ? I don't recall if it does or not.

I vaguely recall adding the ability to search keywords, which may or may not do the job..
Glad to see you back Gary.

No idea but the standard search does search for model and gives the correct results, where as searching for a product name gives at times hundreds of results.