Zen Cart Logo
Forums / All Other Contributions/Addons / Save For Later Support Thread

Save For Later Support Thread

Views: 64,707

Results 221 to 226 of 226
19 Mar 2025, 1:39 PM
#221
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Save For Later Support Thread

I am not sure if this is helpful, but thought I'd post the PHP warning to identify code tweaks for a future update. Please let me know if this is not helpful.

I am running Zen Cart v.2.1 and PHP version 8.3

The warning I receive is

PHP Warning: Undefined array key "action" in /includes/extra_cart_actions/sfl_actions.php on line 17.

Again, just trying to help for future plugin updates....as this warning does not cause any problems with how the plugin functions or operates for the customer.

19 Mar 2025, 6:31 PM
#222
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

I haven't seen this log yet - will keep an eye out. Obviously you can do something like

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

just before the switch to prevent this. But I would have though that by the time you got there, it would be set.

19 Mar 2025, 6:38 PM
#223
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Save For Later Support Thread

Thanks swguy for the code suggestion....I will apply this and let you know how it works out!

Thanks again!

20 Mar 2025, 1:14 PM
#224
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Save For Later Support Thread

Thanks again swguy for the code to fix this warning. I've applied it, tested and no errors!

Thanks again for your help with this.

4 Oct 2025, 9:18 AM
#225
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Save For Later Support Thread

If a customer saves a product for later that you then remove from the database a Warning log is created. This can be stopped by changing line 174 in includes/functions/extra_functions/sfl_functions.php

      if ($products = $db->Execute($products_query)) {

to

      $products = $db->Execute($products_query);
      if (!$products->EOF) {

or if you want to tidy the table

      $products = $db->Execute($products_query);
      if ($products->EOF) {
          remove(products_id);
      } else {
4 Oct 2025, 10:02 AM
#226
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,690
Plugin Contributions:
56

Re: Save For Later Support Thread

thanks for posting! Added for the next update.