One thing that has kind of bugged me for 20 years...

Open to all! Ask other shopowners for help.
Post Reply
frankl
Builder
Posts: 159
Joined: Tue Feb 23, 2021 8:39 pm
Phoenix Version: v1.1.0.4
Has thanked: 17 times
Been thanked: 25 times

One thing that has kind of bugged me for 20 years...

Post by frankl »

In admin when updating the status of an order, there is the option "This will append your comments to the order and the email."

Turning it off only turns it off for the email.

Comments are still appended and shown in Status History on account_history_info.php shop side.

I always alter core code to not show those comments to customer in Status History - obviously if we don't want the customer to see those comments, we don't want them to see them!

So either code needs to be changed, or that wording should be changed to "This will append your comments to the email."


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: One thing that has kind of bugged me for 20 years...

Post by heatherbell »

frankl wrote: Mon Sep 23, 2024 11:37 pm that wording should be changed...
Yes, this has been caught before but slipped through the net:
viewtopic.php?p=5360#p5360

A solution is suggested in that topic of incorporating this into core: app.php/addons/supporters_code/s04e11_admin_comments/
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: One thing that has kind of bugged me for 20 years...

Post by burt »

@frankl if you wanted to have a play to how you feel it should work, I'd be happy to take that code with the potential of putting into Core.

I have changed the text of ENTRY_NOTIFY_COMMENTS_TEXT;
https://github.com/CE-PhoenixCart/Phoen ... 0777712390
I am not here to build for you.
I am here to build with you. Let's help each other.
frankl
Builder
Posts: 159
Joined: Tue Feb 23, 2021 8:39 pm
Phoenix Version: v1.1.0.4
Has thanked: 17 times
Been thanked: 25 times

Re: One thing that has kind of bugged me for 20 years...

Post by frankl »

Is what I use too simple?

In templates/default/includes/pages/account_history_info.php

In this query

Code: Select all

    $statuses_query = $db->query(sprintf(<<<'EOSQL'
SELECT os.orders_status_name, osh.date_added, osh.comments
 FROM orders_status os INNER JOIN orders_status_history osh ON osh.orders_status_id = os.orders_status_id
 WHERE os.public_flag = 1 AND osh.orders_id = %d AND os.language_id = %d
 ORDER BY osh.date_added
EOSQL
        , (int)$_GET['order_id'], (int)$_SESSION['languages_id']));
Add:

Code: Select all

 AND customer_notified = 1
So it becomes

Code: Select all

    $statuses_query = $db->query(sprintf(<<<'EOSQL'
SELECT os.orders_status_name, osh.date_added, osh.comments
 FROM orders_status os INNER JOIN orders_status_history osh ON osh.orders_status_id = os.orders_status_id
 WHERE os.public_flag = 1 AND customer_notified = 1 AND osh.orders_id = %d AND os.language_id = %d
 ORDER BY osh.date_added
EOSQL
        , (int)$_GET['order_id'], (int)$_SESSION['languages_id']));
Or add another tick box 'Show comment shop side?' in admin/includes/actions/orders/views/edit.php?
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: One thing that has kind of bugged me for 20 years...

Post by burt »

I am not here to build for you.
I am here to build with you. Let's help each other.


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