Store Mode

Storemode: blocked page name not in the message. - Store Mode

Storemode: blocked page name not in the message.

by Luckypiedro » Sun Apr 23, 2023 2:07 pm

Example:
suppose the StoreMode is Account or Account_test

If, for example, a create_account is selected, the blocked page name is not included in the notification;
There is also an error message in the system log. i.e. [host xxxx.yy] Backend log: PHP Notice: Undefined variable: page_name in /includes/hooks/shop/system/storeMode.php on line 103\n, referer: http://xxxx.yy/index.php

The message on the page is then
Sorry, you have tried to access the page which is part of a temporarily closed area.
instead of:
Sorry, you have tried to access the create_account page which is part of a temporarily closed area.

Question: Is there anyone who can tell me where this is going wrong?

The versions used are:
Phoenix: 1.0.8.20
StoreMode: 1.5.0 (1.0.8.4 - 1.0.8.20)
Luckypiedro
Posts: 8
Joined: Sun Apr 17, 2022 8:45 am
Contact:

Re: Storemode: blocked page name not in the message.

by raiwa » Sun Apr 23, 2023 4:24 pm

Thank you for the report.
I can confirm this problem.
The redirect script should be a "injectRedirects" hook method instead of "startApplication" because the language definitions are not loaded yet at that point.
I modified the hook and fixed another minor issue.
Please try the below version of: includes\hooks\shop\system\storeMode.php:
1.5.1_fix.zip
(1.74 KiB) Downloaded 37 times
and report back.
I'll then upload a new version with this fix.

Best wishes
Rainer
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
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Storemode: blocked page name not in the message.

by Luckypiedro » Sun Apr 23, 2023 10:04 pm

Hi Raiwa,

Thanks for the quick response.
I tested the new file and it works fine now.

Thanks for the great module.

Luckypiedro
Luckypiedro
Posts: 8
Joined: Sun Apr 17, 2022 8:45 am
Contact:

Re: Storemode: blocked page name not in the message.

by Luckypiedro » Mon Apr 24, 2023 12:22 pm

Hi Raiwa,

In my test environment I unfortunately saw another problem, namely:

Based on the Account / Account_test mode, I saw that if products are placed in the shopping cart and the checkout or Login (for the discount code) is clicked by mistake, an (almost) blank page is displayed.

URL is then: testenvironment.com/discount_code.php
HTML content of the (almost) empty page =

<html>
<head></head>
<body>0</body>
</html>
Note. there is no entry in the log file

I don't think it's the intention to send the customer to an empty page.

The versions used are:
CE Phoenix: 1.0.8.20
StoreMode: 1.5.0 (1.0.8.4 - 1.0.8.20) incl. 1.5.1_fix.zip
Discount_Codes_Phoenix version 5.8.1 (1.0.8.18 - 1.0.8.20)

Server information:
Server OS Linux 3.10.0-962.3.2.lve1.5.60.el7.x86_64
Database MySQL 10.4.27-MariaDB-cll-lve
Server Date 2023-04-24 13:59:41 +0200 CEST
Database Date 2023-04-24 13:59:41
Server Uptime 13:59:41 up 639 days, 12:58, 0 users, load average: 8.44, 8.19, 8.53
HTTP Server Apache/2
PHP Version 7.3.33 (Zend 3.3.33)

Sincerely,
Luckypiedro
Luckypiedro
Posts: 8
Joined: Sun Apr 17, 2022 8:45 am
Contact:

Re: Storemode: blocked page name not in the message.

by raiwa » Mon Apr 24, 2023 12:29 pm

Sorry, but it is not possible to have support for all other addons included by default.
Check if you have "discount_code.php" in the page list and tick it in the account/account_test mode pages list.
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
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact: