Is there any reason why this will not work?

Open to all! Ask other shopowners for help.
Post Reply
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Is there any reason why this will not work?

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

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

Post 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/
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

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

Post 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.
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

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

Post 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..
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

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

Post 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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
ReneH4
Contributor
Posts: 145
Joined: Mon Oct 26, 2020 12:00 pm
Phoenix Version:
Has thanked: 13 times
Been thanked: 17 times

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

Post 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/
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

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

Post 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply