What version of Zen-Cart? I ask because the 1.5.5 version of this module has the link appearing in 'Customers' now instead of Tools and the title is 'Abandoned Carts'
Printable View
When sending emails, they are appearing in email programs as From: Root User<actual email address>.
It doesn't appear this way when emailing from any other modules,etc.
Any thoughts on why this might occur.
Hi,
I just installed this mod into a ZC 1.5.4 but cannot figure out what (if anything) is going on.
The following menus have been added to admin:
• Configuration > Configure RCS (all settings currently default)
• Reports > Recovered Sales Results (shows nothing)
I do not have any new menu beneath Tools.
To test, I went to the store, logged in with a Customer test account, added a few products to the cart, then:
- looked at Reports, NOTHING
- looked below Tools, NOTHING
I then logged my customer account (abandoning cart) and checked both spots again. Still NOTHING.
I checked my error log, found nothing.
Is there some additional step(s) required to enable this mod? Also, is there some way to prevent the mod from automatically sending out email?
Thanks!
Linda,
It could be that your webserver is programmed to always insert a send-from "name" if it's left blank ... and this module appears to be leaving it blank.
So, you could try working around that by changing this line: 287 in admin/recover_cart_sales.php
to:Code:zen_mail('', $outEmailAddr, $subject, $email, '', $from, $html_msg);
Code:zen_mail(STORE_NAME, $outEmailAddr, $subject, $email, '', $from, $html_msg);
This didn't work. So I fiddled with it.
What did work was changing $from to any email address at all. Changing it to '', or just blank, or a non email address all had no impact. It is important to not as well that the email address entered didn't change the value for 'from email address' in the email sent - it always still used the root user email address.
Once I made the $from change, the STORE_NAME change you indicated did impact the reply to name (not the email address) that the email program displayed in the inbox.
Hmmm ... I did some more digging, and I see now that it's trying to combine the name<email> into one parameter, but would be better letting the application do that properly.
I wonder if the following rewrite to that section may be helpful:
toCode:$custname = $basket->fields['fname']." ".$basket->fields['lname'];
$outEmailAddr = '"' . $custname . '" <' . $basket->fields['email'] . '>';
if( zen_not_null(RCS_EMAIL_COPIES_TO) )
$outEmailAddr .= ', ' . RCS_EMAIL_COPIES_TO;
$html_msg['EMAIL_MESSAGE_HTML'] = nl2br($email) . zen_db_prepare_input($_POST['message_html']);
$email = strip_tags($email . "\n\n" . zen_db_prepare_input($_POST['message']));
$from = zen_db_prepare_input($_POST['from']); // STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS
$subject = zen_db_prepare_input($_POST['subject']); // EMAIL_TEXT_SUBJECT
zen_mail('', $outEmailAddr, $subject, $email, '', $from, $html_msg);
Code:$custname = $basket->fields['fname']." ".$basket->fields['lname']; $outEmailAddr = '"' . $custname . '" <' . $basket->fields['email'] . '>';
$html_msg['EMAIL_MESSAGE_HTML'] = nl2br($email) . zen_db_prepare_input($_POST['message_html']);
$email = strip_tags($email . "\n\n" . zen_db_prepare_input($_POST['message']));
$from = zen_db_prepare_input($_POST['from']); // STORE_OWNER . ' <' . STORE_OWNER_EMAIL_ADDRESS . '>'
$subject = zen_db_prepare_input($_POST['subject']); // EMAIL_TEXT_SUBJECT
zen_mail($custname, $basket->fields['email'], $subject, $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, $html_msg);
if (zen_not_null(RCS_EMAIL_COPIES_TO)) {
zen_mail('', RCS_EMAIL_COPIES_TO, $subject, $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, $html_msg);
}
I'm having the weirdest error happen. This module has worked great for years and now it's giving the error "WARNING: An Error occurred, please refresh the page and try again." Is there any reason this would randomly happen? No changes has been made to the site as far as I'm aware. We just did out quarterly PCI compliance, surely that doesn't have anything to do with it.
Is this module actually compatible with 1.5.5e? I haven't been able to install the sql patch. I can't install it from admin patches because I get a 500 Internal error and I can't install it from phpadmin because it says:
I haven't seen any real solution to the problem here, has anyone installed it successfully on 1.5.5e?Quote:
#1048 - Column 'configuration_group_id' cannot be null
Add. Info:
PHP Version: 5.6.30 (Zend: 2.6.0)
Database: MySQL 5.6.35
Did you do a Copy & Paste or upload file?
If a previous install attempt went bad then suggest you upload the "uninstall.sql" file (and hopefully there is one) to remove any partial install of the module. Disregard any error msgs. from the uninstall. Then use the upload sql method and start fresh. If you still get an error msg. then contact your Hoster as odds are a Server Firewall rule is blocking your attempt and they can white-list the rule for your Hosting account.
Things changed somewhere around the 1.5.5 and up versions so that the DB_PREFIX was properly included in an sql file upload, and it now works the way it should.
Now, as per the readme file (and I remember long time ago I installed this mod on a 1.3.9 store) the Tools > Recover Cart Sales doesn't appear. I only have the Configuration > Configure RCS, a Customers > Abandoned Carts and a Reports > Recover Cart Sales Report
I'm missing a page. :mellow:
------------
Nevermind, I figured it out!
For ZC v1.5 and up one must use RCS v4.0.1 which includes an "upgrade.sql". Didn't read the whole upgrade process though.
The latest upgrade on the Plugins section says:
Quote:
Moved the list of Abandoned Carts to the Customers menu instead of the Tools menu.
Fixed some inconsistencies in language strings and table headings.
Wasn't aware current version is 4.0.3 and suggest you follow whatever the Readme states.
Hi, I downloaded the plugin and I am indeed seeing quite a few entries and I love being able to see them.
When I go to "Customers" tab and click the "Abandoned Cart" link, it seems to be displaying everything, but is there a way to display it by date? Here is an excerpt of what I'm getting:
1 09/19/2017
2 08/28/2017
3 09/19/2017
4 09/20/2017
5 08/23/2017
6 08/27/2017
7 09/02/2017
8 09/12/2017
9 09/22/2017
There does not seem to be any order except the number under "Uncontacted" which, right now, are all checked.
This would make WAY more sense to me if it was in DATE order with the latest (newest) stuff on top.
Is there some configuration or something that will allow what I need?
Thanks,
Ray
Never noticed the previous question...
Change
toPHP Code:
ORDER BY cb.customers_id ASC, cb.customers_basket_date_added DESC");
PHP Code:
ORDER BY cb.customers_basket_date_added DESC");
I apologize if this has been answered already. I searched but did not find the same issue. Everything works great except the product links sent in the email are incomplete. They only show the URL after the main domain. Thank you for any assistance.
For example
1 x USB Rechargeable Beanie Headlight, Black
/magnification-lighting/flashlights/usb-rechargeable-beanie-headlight-black
I have the same problem ideasgirl was posting about. I had installed a copy of this years ago on an old 1.3?? cart. Since then, I've updated my cart by starting with a completely new file set/template and upgraded the database. I'm trying to reinstall this mod, but am missing the Customers> Abandoned Carts menu. Also, when I try to populate Reports>Recovered Sales Results no abandoned carts are shown. Nice to think I'm that successful, but I'm sure it's not true!
Any thoughts?
Just downloaded/installed with my 1.5.4 version store. The Abandoned Cart Report displays correctly, however, when I attempt to send an email nothing happens. And, I found this in the error logs
Where does this function live? Did it get moved or renamed maybe?Quote:
[25-Aug-2019 21:20:06 UTC] PHP Fatal error: Call to undefined function zen_get_info_page() in /home/www/myStore/includes/classes/usu.php on line 324
Here is the code referenced in the error message....
This seems like a good tool to attempt to close the sale with an abandoned cart, but not if it can't generate and send emails.PHP Code:
// Add the cPath to the start of the parameters if present
if(is_string($cPath)) array_unshift($p, 'cPath=' . $cPath);
$this->log('Parsing Parameters for ' . $page);
$this->log(var_export($p, true));
$container = array();
foreach ($p as $index => $valuepair){
$p2 = @explode('=', $valuepair);
switch ($p2[0]){
case 'products_id':
// Make sure if uprid is passed it is converted to the correct pid
$p2[1] = zen_get_prid($p2[1]);
switch(true) {
// Handle product urls (check page against handler)
case ($page == zen_get_info_page($p2[1])): //LINE 324
// If a cPath was present we need to determine the immediate parent cid
$cID = null;
if(array_key_exists('cPath', $container)) {
$cID = strrpos($container['cPath'], '_');
if($cID !== false)
{
$cID = substr($container['cPath'], $cID+1);
}
else {
$cID = $container['cPath'];
}
if(USU_CATEGORY_DIR != 'off' || USU_CPATH != 'auto') {
unset($container['cPath']);
}
}
$url = $this->make_url($page, $this->get_product_name($p2[1], $cID), $p2[0], $p2[1], USU_END, $separator);
break;
Thanks for any help you can offer.
FYI - I get the same result when installing on a 1.5.5 version store as well.
This file is from another plugin, not RCS. You might try posting in that thread:
https://www.zen-cart.com/showthread....Support-Thread
Hey Guys,
I am using recover_cart_sales.php v4.00.00a 2012/04/23, but I want to upgrade to the newest version. Is there steps that I can take to make sure I do the upgrade correctly?
I am use zen cart version 1.5.5a.
what is in the new versions that is different then the version I have. Is the email better? Does it send it out automatically or do you still have to press the send button?
how can i make this work with v 1.56
I guess it won't be modified to support 1.5.6 since there hasn't been a response to your inquiry for almost a month. Bummer, was thinking about using this mod.
How to send multiple reminders in case the users have not completed the sale at least three reminders at alternate day intervals ?
I haven't looked at this mod in years, but if I recall correctly it only tracks "whether the customer has been reminded once". Its config settings let you exclude customers who place an order matching the abandoned cart.
I suppose you could track multiple reminders by adding fields to the database table and customizing the code to store the history of each notification, and then updating the report to filter/sort based on the number of reminders. And probably some cleanup or exclusions after a certain threshold.
Isn't emailing more than once considered harrassment??? Personally, I delete those emails and never go back and purchase, and allowing for the extra stress everyone is under at the moment with Covid-19, etc, I'd be less inclined to be chasing anyone up...
Hello,
Installing the new pack (4.0.6) gives a blank page (without any configuration elements) when you go to Configuration > Recover RCS.
Firstly what version of zc are you using?
Have you had recover cart installed before?
Have you logged out of admin and logged back to check for changes?
I have recover cart 4.0.5 working on zc157c and zc157d and just installed recover cart 4.0.6 over the top and it works correctly without any alterations.
I did the installation just after the patch from 1.5.7b to 1.5.7d. Everything else looked fine, just that page is the one that doesn't look right. First time installation on this cart.
Ckeditor Not working.
Zencart Version : 1.5.7
Module : Recover Cart Sales
Problem : Ckeditor Not Loading . On other pages i.e. define page editor, ezpages, send email Ckeditor Loads.
Attachment 20009
Here is the fix.
On recover_cart_sales.php Replace below line. LINE NO #555
WITHCode:echo zen_draw_textarea_field('message_html', 'soft', '100%', '25', stripslashes($_POST['message_html']), 'id="message_html"');
Code:echo zen_draw_textarea_field('message_html', 'soft', '100%', '25', htmlspecialchars(stripslashes(isset($_POST['message_html'])?$_POST['message_html']:''), ENT_COMPAT, CHARSET, TRUE), 'id="message_html" class="editorHook form-control"');
Please, I need help to get the recover cart module working on ZC 1.5.8 so I can upgrade production sites and I do not have enough php knowledge to fix the errors occurring.
I am currently testing with this configuration:
Server: Ubuntu 20.04 PHP 8.1 MySQL 8.0.31 (I have ran ZC for many years but I did confirm all recommended server requirements are present just in case something changed with 1.5.8)
Test Site: Zen Cart 1.5.8 with the exception of the Recover Cart 4.0.6 being tested no additional modules have been installed and no demo data (I have found there is a problem with the 1.5.8 install that changes the ownership of the demo images/folders added during the install process to www-data blocking sftp manipulation, if you change them back to the correct owner it breaks image display). I have created a couple of categories and items to provide data for recover carts.
Test Site url: a l t 1.h u m p h r e y s t o w b a r s.c o m
The Recover Carts module is currently using all default setting from the installation.
After install when I drop down Customers and Click Abandon Carts I get a blank page and this debug error: (I changed the domain and admin folder hoping to make this easier to read)
After researching I found that (admin)'includes/languages/english/mail.php' had changed name to lang.mail.php.Code:[22-Nov-2022 14:22:04 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(37): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/recover_cart_sales.php(37): require()
#2 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: require(includes/languages/english/mail.php): Failed to open stream: No such file or directory in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 37.
[22-Nov-2022 14:22:04 America/Chicago] PHP Fatal error: Uncaught Error: Failed opening required 'includes/languages/english/mail.php' (include_path='.:/usr/share/php') in /var/www/domain.com/public_html/admin/recover_cart_sales.php:37
Stack trace:
#0 /var/www/domain.com/public_html/admin/index.php(11): require()
#1 {main}
thrown in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 37
[22-Nov-2022 14:22:04 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
--> PHP Fatal error: Uncaught Error: Failed opening required 'includes/languages/english/mail.php' (include_path='.:/usr/share/php') in /var/www/domain.com/public_html/admin/recover_cart_sales.php:37
Stack trace:
#0 /var/www/domain.com/public_html/admin/index.php(11): require()
#1 {main}
thrown in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 37.
I changed the end of line 37 to: '/' . 'lang.' . FILENAME_MAIL . '.php');
which cleared this error, and I do not think it will cause additional problem since it is simply correcting the name of the file required.
Now when I click Abandoned Carts I get the top portion of the page down to the subject line and I have the following error in the debug logs.
Which up to this point I have had no success in resolving.Code:22-Nov-2022 14:37:51 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(41): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined variable $action in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 41.
[22-Nov-2022 14:37:51 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(47): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined array key "action" in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 47.
[22-Nov-2022 14:37:51 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(58): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined array key "action" in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 58.
[22-Nov-2022 14:37:51 America/Chicago] PHP Fatal error: Uncaught Error: Undefined constant "TEXT_MESSAGE_HTML" in /var/www/domain.com/public_html/admin/recover_cart_sales.php:541
Stack trace:
#0 /var/www/domain.com/public_html/admin/index.php(11): require()
#1 {main}
thrown in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 541
[22-Nov-2022 14:37:51 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
--> PHP Fatal error: Uncaught Error: Undefined constant "TEXT_MESSAGE_HTML" in /var/www/domain.com/public_html/admin/recover_cart_sales.php:541
Stack trace:
#0 /var/www/domain.com/public_html/admin/index.php(11): require()
#1 {main}
thrown in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 541.
NOTE that I have not tested this as I don't have a 1.5.8 for adding the mod. Nor is it my forte. Just some thoughts on the matter. Use at your own risk.
If Recover Cart has its own extra_filenames.php, you might want to fix it there. Or...
How's about just changing the defined name in includes/filelnames.php. Line 102. Change 'mail' to 'lang.mail'. Or, if it needs to be different because something else is using FILENAME_MAIL, copy line 102 to 103 and make the new line FILENAME_MAIL_RECOVER with 'lang.mail'
toCode:define('FILENAME_LOGIN', 'login');define('FILENAME_LOGOFF', 'logoff');
define('FILENAME_MAIL', 'mail');
define('FILENAME_MAIN_PRODUCT_IMAGE', 'main_product_image');
orCode:define('FILENAME_LOGIN', 'login');define('FILENAME_LOGOFF', 'logoff');
define('FILENAME_MAIL', 'lang.mail');
define('FILENAME_MAIN_PRODUCT_IMAGE', 'main_product_image');
With the last, you would need to change the call in the Recover Cart file to look for FILENAME_MAIL_RECOVER versus FILENAME_MAILCode:define('FILENAME_LOGIN', 'login');define('FILENAME_LOGOFF', 'logoff');
define('FILENAME_MAIL', 'mail');
define('FILENAME_MAIL_RECOVER', 'lang.mail');
define('FILENAME_MAIN_PRODUCT_IMAGE', 'main_product_image');
i will give my thoughts on the matter.
first off, i would ignore all of the well-intentioned advice here.
second, i would look to the plugin author for fixes.
third, you can try some of my code. being that i do have a working v158 test site available...
looking at admin/recover_cart_sales.php, just after the file change you made at line 37, add the following code:
i am not sure if that is the approved method for loading a language file that does not get loaded as part of the autoloading process, but i have reasonable confidence that this fix will address your first issue.PHP Code:
if (!function_exists('defineIfNot')) {
function defineIfNot(string $name, string $definition)
{
if (!defined($name)) {
define($name, $definition);
}
}
}
foreach ($define as $key => $value) {
defineIfNot($key, $value);
}
the second issue requires a bit more work. you can add the following line right after the code above:
and the replace all instances (other than the line i just gave you above) of:PHP Code:
$action = $_GET['action'] ?? 'noAction';
$_GET['action']
with
$action
and that should address the 2nd issue you are having.
let us know how it goes.
and ping the plugin author to see if he can update the plugin.
best.
It Worked!
I knew if I threw something out there, Paul would come to my rescue!
:rotflmao:
I thank everyone for the replies and the efforts to help.
I did send a private message to the person listed as the author (Ryk) on the download site. The last update lists The Software Guy but I did not send to him.
After reading what dbltoe sent, this fix only addresses the FILENAME_MAIL which I fixed in line 37 it is the other errors that are the main problem. I made the change in the recover_cart_sales file because FILENAME_MAIL is used in multiple other places throughout the code and it was simplest to fix it in the only file that was causing a problem.
Then I applied what Carlwhat sent with these results:
I inserted the first code snippet in at line 41 (the other change was at line 37 and line 38 and 39 already had code line 40 is blank)
Next below that I inserted the second snippet at line 54 (one blank line below the previous snippet)
Finally I searched for $_GET['action'] and replaced them with $action (before the changes they were on lines 47, 58, and 162 (2 places)) on lines 62, 73, and 177 (2 places)
When I go to customers and click abandoned carts I now get a blank page and the debug report below
I am sure it is close I could have done something wrong but I have done this several times and the results are the same so I can not identify anything wrong.Code:[23-Nov-2022 14:29:09 America/Chicago] PHP Parse error: syntax error, unexpected identifier "##" in /var/www/admin/public_html/admin/recover_cart_sales.php on line 41
[23-Nov-2022 14:29:09 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
--> PHP Parse error: syntax error, unexpected identifier "##" in /var/www/admin/public_html/admin/recover_cart_sales.php on line 41.
Note: In the code I am not sure why it put "##" the actual error shows " "
post lines 30-50 here, and lets see where you went adrift.
also please indicate which line is the one where the error occurs.
Hi. Not really sure why the forum lists me as the "owner" as we added an update many years ago to Conor's original - although that was on a previous incarnation of the forum!
I probably can't personally answer the question (I work as Development Manager with JSWeb Ltd, but am not a developer/programmer/coder) but if you post the code snippet as carlwhat suggests, someone should be able to spot the error. Probably just a typo.
The error indicates the error is in line 41 if##(!function_exists('defineIfNot'))##{Code:require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . 'lang.' . FILENAME_MAIL . '.php');
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
if##(!function_exists('defineIfNot'))##{
########function##defineIfNot(string##$name,##string##$definition)
########{
################if##(!defined($name))##{
########################define($name,##$definition);
################}
########}
}
foreach##($define##as##$key##=>##$value)##{
########defineIfNot($key,##$value);
}
$action##=##$_GET['action']##??##'noAction';
After seeing how this pasted in with all the # signs apparently I have a problem with pasting from my machine. This was copied out from the server using nano. It does not show the number signs but when I turn on the white space I can see spaces are not there. I modified the file with nano and now the spaces show and the error changes so it is something with the way I am editing files. I am working to identify that and will update when I know more.
Attention all developers, especially those just getting started:
The community needs volunteers to step up and adopt plugins like this. It's a great way to help the project and to build your skills at the same time.
https://docs.zen-cart.com/dev/plugins/adoption/
Ok after several hours of work I know the cause of the problem it is being generated by using FireFox to copy to code from the web it is putting spurious characters in for spaces. I do not know why or how to fix this but I will worry about that later.
Nano nor Vim with see it but cat –A, the ZC website (the # in the previous post), and apparently php8.1 see it. This is a sample of the results of cat -A:
I have found a work around (I manually typed the code in nano) and now have cleared the error with the changed code. When I click customer and choose Abandoned Carts I get the full page and it is showing abandoned carts (I had a test one sitting in the db) however I get the following Debug error:Code:ifM-BM- (!function_exists('defineIfNot'))M-BM- {^M$
M-BM- M-BM- M-BM- M-BM- functionM-BM- defineIfNot(stringM-BM- $name,M-BM- stringM-BM- $definition)^M$
M-BM- M-BM- M-BM- M-BM- {^M$
M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- ifM-BM- (!defined($name))M-BM- {^M$
M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- define($name,M-BM- $definition);^M$
M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- M-BM- }^M$
M-BM- M-BM- M-BM- M-BM- }^M$
}^M$
I do not have mail installed on this particular test server, it is just basic, so I cannot check to see if it is sending correctly at the moment.Code:[24-Nov-2022 14:50:49 America/Chicago] Request URI: /humphreystow/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/alt1.humphreystowbars.com/public_html/humphreystow/recover_cart_sales.php(577): zen_debug_error_handler()
#1 /var/www/alt1.humphreystowbars.com/public_html/humphreystow/index.php(11): require('...')
--> PHP Warning: Undefined array key "message" in /var/www/alt1.humphreystowbars.com/public_html/humphreystow/recover_cart_sales.php on line 577.
Undefined key warning:
https://docs.zen-cart.com/user/upgra...ined-array-key
i'm showing this on line 563:
which i am guessing corresponds to your line 577.PHP Code:
<td><?php echo zen_draw_textarea_field('message', 'soft', '100%', '15', $_POST['message']); ?></td>
that warning can be resolved like so:
best.PHP Code:
<td><?php echo zen_draw_textarea_field('message', 'soft', '100%', '15', $_POST['message'] ?? ''); ?></td>
Well here it goes, these are the warnings/errors I am currently seeing with the Recover Cart Module
Errors
[code][25-Nov-2022 15:07:13 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 [internal function]: zen_debug_error_handler()
#1 /var/www/alt1.adminbars.com/public_html/admin/recover_cart_sales.php(397): strtotime()
#2 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 397.
[25-Nov-2022 15:07:13 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(505): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined variable $ib in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 505.
[25-Nov-2022 15:07:13 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(510): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined array key "page" in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 510.
[25-Nov-2022 15:07:13 America/Chicago] Request URI: /admin/index.php?cmd=recover_cart_sales, IP address: 98.190.184.37
#0 /var/www/domain.com/public_html/admin/recover_cart_sales.php(577): zen_debug_error_handler()
#1 /var/www/domain.com/public_html/admin/index.php(11): require('...')
--> PHP Warning: Undefined array key "message" in /var/www/domain.com/public_html/admin/recover_cart_sales.php on line 577. [/code}
Using the link supplied by the Software Guy, I look in the docs and made changes that seem to work however I am not sure they are actually correct.
Line 577
Was:
Changed to:Code:td><?php echo zen_draw_textarea_field('message', 'soft', '100%', '15', $_POST['message']); ?></td>
Line 510Code:<td><?php echo zen_draw_textarea_field('message', 'soft', '100%', '15', (!empty($_POST['message']))) ?></td>
Was:
Changed to:Code:'products_type']), "page=" . $_GET['page'] . "&product_type=" . $products->fields['products_type'] . "&cPath=" . zen_get_product_path((int)$basket->fields[
Line 505 Undefined variable $ib I found nothing on this type of error in the docs, I did look at other sources and tried to guess a fix but had no luck. The same is true for the warning on line 397 PHP Deprecated: strtotime().Code:'products_type']), "page=" . (!empty($_GET['page'])). "&product_type=" . $products->fields['products_type'] . "&cPath=" . zen_get_product_path((int)$basket->fields[
If anyone can help with those 2 it would be much appreciated.
Your line numbers don't correspond to the latest download - are you working with the last version of the plugin?
This mod hasn't been upgraded for PHP 8.1 yet - you might be better off to go down to PHP 7.4 until there's an update for this plugin, then go to PHP 8.0 then to 8.1.
I am aware the mod has not been updated.
I am testing trying to get everything working to upgrade production sites. I have many hours invested in this and was close to completing it, I have identified and tested the server upgrades needed and I have a working sitemap and Google ReCaptcha, recover carts was the final module I needed and to appearance I have corrected all the other errors it was throwing except the 2 listed in the post.
The line numbers do not match because I was using the file that has been modified with the previous posts in this thread. I am sorry I forgot to include the original file line numbers.
The original line numbers are mod file line 505 = original file line 491 and mod file line 397 = original file line 383.
The production sites are already at 1.5.7c and PHP 7.4, (which hits end of life in 2 days (11/28/22) this is the first chance I have had the time to work on moveing up to 1.5.8 and PHP 8.1 which is why I have put so much effort into it.
$ib issue
original file admin/recover_cart_sales.php" line 356 add
$ib = 0;
strtotime issue
That value should not be null but I guess it is so you will want to change
original file admin/recover_cart_sales.php" line 383
from
if ((time()-(RCS_EMAIL_TTL*24*60*60)) <= strtotime($basket->fields['datemodified'])) {
to
$mod = $basket->fields['datemodified'];
if (empty($mod)) {
$mod = date('Ymd');
}
if ((time()-(RCS_EMAIL_TTL*24*60*60)) <= strtotime($mod)) {
btw please package and submit to plugins once you have it working.
I've submitted an updated version for review. Hopefully the moderators won't take too long to approve it.
would this plugin work on ZC 1.5.8a ?
Thank you
I have some fixes that I will get in ASAP.
Updated to use new language files.