1.1.0.8 Questions / Comments / Concerns / Feedback

Open to all! Ask other shopowners for help.
User avatar
burt
Core Team
Posts: 4911
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 494 times

Re: 1.1.0.8 Questions / Comments / Concerns / Feedback

Post by burt »

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

Tags:



Join The Code Co-op to get access to your library in the Code Co-op Forum
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

Post by 14Steve14 »

Thanks @burt Gary. Seems to have worked after manually updating the file.

User avatar
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

Post by Pierre_P »

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.

User avatar
burt
Core Team
Posts: 4911
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 494 times

Re: 1.1.0.8 Questions / Comments / Concerns / Feedback

Post by burt »

Pierre_P wrote: ↑Wed Oct 21, 2026 10:41 pm Bug: account_newsletters.php subscribes customers who never subscribed
...
In PHP7 this would have been correct but with PHP8 it no longer works that way.
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.

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

Post by PiLLaO »

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:

Code: Select all

  if (!empty($order->info['comments'])) {
    echo htmlspecialchars($order->info['comments']) . "\n";
  }
For this, comments are append to email

Code: Select all

  if (!empty($_POST['comments'])) {
    echo htmlspecialchars($_POST['comments']) . "\n";
  }
Regards

User avatar
burt
Core Team
Posts: 4911
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 494 times

Re: 1.1.0.8 Questions / Comments / Concerns / Feedback

Post by burt »

@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.
I am not here to build for you.
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

Post by PiLLaO »

I think this are coming from here:
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');
And now, there is not $_SESSION['comments'] to erase



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