TY
https://github.com/CE-PhoenixCart/Phoen ... 9a45c0412a
1.1.0.8 Questions / Comments / Concerns / Feedback
- burt
- Core Team
- Posts: 4911
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 494 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
Tags:
-
14Steve14
- 500+
- Posts: 901
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 19 times
- Been thanked: 113 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
Thanks @burt Gary. Seems to have worked after manually updating the file.
- Pierre_P
- 100+
- Posts: 132
- Joined: Fri Mar 12, 2021 5:06 am
- Phoenix Version: v1.1.0.6
- Has thanked: 23 times
- Been thanked: 12 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
Bug: account_newsletters.php subscribes customers who never subscribed
Up to versions 1.1.0.9
PHP 8.2
Steps to reproduce:
In admin install Newsletter at Customer Data.
1. Create an account with the newsletter box unticked, stores false in database which is saved as customers_newsletter = ''
2. Navigate to Newsletters (account_newsletters.php). The box is unticked.
3. Leave it unticked and press Update Preferences.
The customer is now subscribed without ever ticking the box
In PHP7 this would have been correct but with PHP8 it no longer works that way.
Up to versions 1.1.0.9
PHP 8.2
Steps to reproduce:
In admin install Newsletter at Customer Data.
1. Create an account with the newsletter box unticked, stores false in database which is saved as customers_newsletter = ''
2. Navigate to Newsletters (account_newsletters.php). The box is unticked.
3. Leave it unticked and press Update Preferences.
The customer is now subscribed without ever ticking the box
In PHP7 this would have been correct but with PHP8 it no longer works that way.
- burt
- Core Team
- Posts: 4911
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 494 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
Cannot recreate.
Seems to work as intended, tested in PHP8.3.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
PiLLaO
- 100+
- Posts: 140
- Joined: Thu Nov 05, 2020 9:28 pm
- Phoenix Version: v1.1.0.6
- Has thanked: 75 times
- Been thanked: 19 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
I make a fresh install of v1.1.0.8, when I make an order comments are saved on database but aren't append to email.
I use a override tpl_n_checkout.php to see the problem, and add a var_dump($order) to see it. $order->info['comments'] are empty (string(0))
If I make an order update, comments append to email correctly.
EDIT:
in catalog/includes/modules/notifications/templates/tpl_n_checkout.php
Changing this:
For this, comments are append to email
Regards
I use a override tpl_n_checkout.php to see the problem, and add a var_dump($order) to see it. $order->info['comments'] are empty (string(0))
If I make an order update, comments append to email correctly.
EDIT:
in catalog/includes/modules/notifications/templates/tpl_n_checkout.php
Changing this:
Code: Select all
if (!empty($order->info['comments'])) {
echo htmlspecialchars($order->info['comments']) . "\n";
}
Code: Select all
if (!empty($_POST['comments'])) {
echo htmlspecialchars($_POST['comments']) . "\n";
}
- burt
- Core Team
- Posts: 4911
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy A Coffee
- Has thanked: 296 times
- Been thanked: 494 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
@PiLLaO TY. I think this was covered in a previous release and determined that it's best to leave it as-is. Can't quite remember.
Could you keep an eye on your change for me, and if it comes up as "no problems" we can make the change in a future release.
Could you keep an eye on your change for me, and if it comes up as "no problems" we can make the change in a future release.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
PiLLaO
- 100+
- Posts: 140
- Joined: Thu Nov 05, 2020 9:28 pm
- Phoenix Version: v1.1.0.6
- Has thanked: 75 times
- Been thanked: 19 times
Re: 1.1.0.8 Questions / Comments / Concerns / Feedback
I think this are coming from here:
https://github.com/CE-PhoenixCart/Phoen ... 1a5a2f0d53
After this commit it uses this hook:
And now, there is not $_SESSION['comments'] to erase
https://github.com/CE-PhoenixCart/Phoen ... 1a5a2f0d53
After this commit it uses this hook:
Code: Select all
INSERT INTO hooks (hooks_site, hooks_group, hooks_action, hooks_code, hooks_class, hooks_method) VALUES ('shop', 'reset', 'resetStart', '_46_unset_comments', 'session_eraser', 'comments');
