Results 1 to 10 of 673

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,701
    Plugin Contributions
    11

    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
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,915
    Plugin Contributions
    13

    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.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,701
    Plugin Contributions
    11

    Default Re: Recover Cart

    It Worked!

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

    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    75
    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.

  5. #5
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,915
    Plugin Contributions
    13

    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.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  6. #6
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    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 - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  7. #7
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    75
    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.

  8. #8
    Join Date
    Jan 2015
    Location
    Pensacola Florida
    Posts
    75
    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.

 

 

Similar Threads

  1. Shipping Rates in Cart [support thread]
    By Steven300 in forum Addon Shipping Modules
    Replies: 95
    Last Post: 12 May 2023, 02:39 AM
  2. Shopping Cart Steps Images [Support Thread]
    By Trinity14 in forum Addon Templates
    Replies: 21
    Last Post: 11 Apr 2021, 05:35 AM
  3. 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
  4. Empty Cart Manager [support thread]
    By Steven300 in forum All Other Contributions/Addons
    Replies: 49
    Last Post: 26 May 2010, 10:26 AM

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