Page 65 of 66 FirstFirst ... 155563646566 LastLast
Results 641 to 650 of 660
  1. #641
    Join Date
    Mar 2011
    Posts
    32
    Plugin Contributions
    0

    Default Re: Recover Cart

    Here is the fix.

    On recover_cart_sales.php Replace below line. LINE NO #555

    Code:
    echo zen_draw_textarea_field('message_html', 'soft', '100%', '25', stripslashes($_POST['message_html']), 'id="message_html"');
    WITH

    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"');

  2. #642
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    74
    Plugin Contributions
    0

    Default Re: Recover Cart

    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)

    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.
    After researching I found that (admin)'includes/languages/english/mail.php' had changed name to lang.mail.php.

    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.

    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.
    Which up to this point I have had no success in resolving.

  3. #643
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,680
    Plugin Contributions
    9

    Default Re: Recover Cart

    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'
    Code:
    define('FILENAME_LOGIN', 'login');define('FILENAME_LOGOFF', 'logoff');
    define('FILENAME_MAIL', 'mail');
    define('FILENAME_MAIN_PRODUCT_IMAGE', 'main_product_image');
    to
    Code:
    define('FILENAME_LOGIN', 'login');define('FILENAME_LOGOFF', 'logoff');
    define('FILENAME_MAIL', 'lang.mail');
    define('FILENAME_MAIN_PRODUCT_IMAGE', 'main_product_image');
    or
    Code:
    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');
    With the last, you would need to change the call in the Recover Cart file to look for FILENAME_MAIL_RECOVER versus FILENAME_MAIL

  4. #644
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,426
    Plugin Contributions
    11

    Default Re: Recover Cart

    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:

    PHP Code:
    if (!function_exists('defineIfNot')) {
        function 
    defineIfNot(string $namestring $definition)
        {
            if (!
    defined($name)) {
                
    define($name$definition);
            }
        }
    }

    foreach (
    $define as $key => $value) {
        
    defineIfNot($key$value);

    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.

    the second issue requires a bit more work. you can add the following line right after the code above:

    PHP Code:
    $action $_GET['action'] ?? 'noAction'
    and the replace all instances (other than the line i just gave you above) of:

    $_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.
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

  5. #645
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    8,680
    Plugin Contributions
    9

    Default Re: Recover Cart

    It Worked!

    I knew if I threw something out there, Paul would come to my rescue!


  6. #646
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    74
    Plugin Contributions
    0

    Default Re: Recover Cart

    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

    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.
    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.

    Note: In the code I am not sure why it put "##" the actual error shows " "
    Last edited by websmith; 23 Nov 2022 at 09:39 PM.

  7. #647
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,426
    Plugin Contributions
    11

    Default Re: Recover Cart

    post lines 30-50 here, and lets see where you went adrift.

    also please indicate which line is the one where the error occurs.
    mxWorks now has premium plugins
    are you using square? have you shown any appreciation with cake on venmo or on paypal?
    called the savior by the chief bottle washer...

  8. #648
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,233
    Plugin Contributions
    20

    Default Re: Recover Cart

    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.
    Development Manager @ JSWeb Ltd
    Over 15 years with Zencart

  9. #649
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    74
    Plugin Contributions
    0

    Default Re: Recover Cart

    Quote Originally Posted by carlwhat View Post
    post lines 30-50 here, and lets see where you went adrift.

    also please indicate which line is the one where the error occurs.
    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';
    The error indicates the error is in line 41 if##(!function_exists('defineIfNot'))##{
    Last edited by websmith; 24 Nov 2022 at 05:26 PM.

  10. #650
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    74
    Plugin Contributions
    0

    Default Re: Recover Cart

    Quote Originally Posted by websmith View Post
    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';
    The error indicates the error is in line 41 if##(!function_exists('defineIfNot'))##{
    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.

 

 
Page 65 of 66 FirstFirst ... 155563646566 LastLast

Similar Threads

  1. Shopping Cart Steps Images [Support Thread]
    By Trinity14 in forum Addon Templates
    Replies: 21
    Last Post: 11 Apr 2021, 05:35 AM
  2. v151 AJAX Add to Cart [Support Thread]
    By balihr in forum All Other Contributions/Addons
    Replies: 133
    Last Post: 20 Oct 2020, 02:16 AM
  3. Shipping Rates in Cart [support thread]
    By Steven300 in forum Addon Shipping Modules
    Replies: 94
    Last Post: 6 Mar 2019, 09:06 PM
  4. Empty Cart Manager [support thread]
    By Steven300 in forum All Other Contributions/Addons
    Replies: 49
    Last Post: 26 May 2010, 10:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR