Discount Codes

Blank Page when admin discoount_code.php loads - Discount Codes

Blank Page when admin discoount_code.php loads

by Xpajun » Mon Dec 18, 2023 9:00 pm

Hi Raiwa,
Just put this on my store - the front end looks like it's working but when I try to set the discount code in admin I get a blank Page.
I get the following error:
#0 {main}
thrown in /home/********/public_html/store/admin/discount_codes.php on line 25
[18-Dec-2023 18:53:44 UTC] PHP Fatal error: Uncaught Error: Class 'Text' not found in /home/*******/public_html/store/admin/discount_codes.php:25
Stack trace:
Line 25 is the 3rd in the following code:

Code: Select all

  $action = (isset($_GET['action']) ? $_GET['action'] : '');

  if (!Text::is_empty($action)) {
    switch ($action) {
      case 'setflag':
        tep_db_query(sprintf(<<<'EOSQL'
UPDATE discount_codes 
  SET status = %s 
  WHERE discount_codes_id = %s 
  LIMIT 1
EOSQL
        , (int)$_GET['flag'], (int)$_GET['dID']));


Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Contact:

Re: Blank Page when admin discoount_code.php loads

by raiwa » Tue Dec 19, 2023 7:54 am

Hi,

Please tell us always the addon, Phoenix and PHP version you are using.
It seems you are using an old discount codes version.
Please update to the correct version for your store.
Make also sure you have the following file in place:
includes\system\versioned\1.0.8.2\text.php
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Blank Page when admin discoount_code.php loads

by Xpajun » Tue Dec 19, 2023 9:58 am

Sorry I realised that I didn't tell you the version it's 5.5.1 and I have includes\system\versioned\1.0.7.14\ but that doesn't include text.php I'm trying it on 1.0.7.5
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Contact:

Re: Blank Page when admin discoount_code.php loads

by Xpajun » Tue Dec 19, 2023 10:18 am

Update:
I've copied and uploaded the text.php from includes\system\versioned\1.0.8.2\ and uploaded it to includes\system\versioned\1.0.7.14\ - the page is now loading
I shall now be testing it to make sure it does work on 1.0.7.5
Thank you for your input
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Contact:

Re: Blank Page when admin discoount_code.php loads

by Xpajun » Tue Dec 19, 2023 2:36 pm

Further update:
I had to change

Code: Select all

    require(language::map_to_translation('/hooks/shop/siteWide/discountCode.php'));
to

Code: Select all

    require ('includes/languages/english/hooks/shop/siteWide/discountCode.php');
and put that file in includes/languages/english/hooks/shop/siteWide/ rather than templates

I don't use any other languages but I'm not sure why the map_to_translation didn't work
But it does give me a stop gap until I manage to launch the latest version of Phoenix

Thank you
Current Store is now running 1.0.9.0 - php 8.2.18
Now working on taking a short rest :D - php 8.2.18
Xpajun
Contributor
Posts: 187
Joined: Thu Mar 04, 2021 1:18 pm
Phoenix Version: v1.0.9.0
Contact:

Re: Blank Page when admin discoount_code.php loads

by PBR Streetgang » Fri Mar 22, 2024 9:05 pm

I'm on php 8.0 and using version 1.0.9.0. I have white pages. Any advice would be greatly appreciated.
PBR Streetgang
Member
Posts: 48
Joined: Fri Nov 19, 2021 4:09 pm
Phoenix Version:
Contact:

Re: Blank Page when admin discoount_code.php loads

by raiwa » Fri Mar 22, 2024 9:08 pm

Please read the “Need Help” post linked in my footer and provide more info.
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Blank Page when admin discoount_code.php loads

by PBR Streetgang » Fri Mar 22, 2024 9:14 pm

PHP 8.0
New Install
Phoenix version 1.0.9.0
Installed addons
hide buy price
Maths Recaptcha
Ship in cart
PBR Streetgang
Member
Posts: 48
Joined: Fri Nov 19, 2021 4:09 pm
Phoenix Version:
Contact:

Re: Blank Page when admin discoount_code.php loads

by raiwa » Fri Mar 22, 2024 9:20 pm

Which discount code version did you install?
Where exact (page/url) do you get the blank page?
Did you install the order total discount code module?
What are you.doing/trying to do when you get the blank page?
Check you error log for related errors and post them.
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
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Contact:

Re: Blank Page when admin discoount_code.php loads

by PBR Streetgang » Fri Mar 22, 2024 9:43 pm

5.8.1
My dashboard is blank, I can’t navigate to anything
PBR Streetgang
Member
Posts: 48
Joined: Fri Nov 19, 2021 4:09 pm
Phoenix Version:
Contact: