Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Jul 2008
    Posts
    8
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    You could try something like this in your functions_general.php file, function "zen_back_link()" at around line 994.

    replace:

    Code:
    $link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
    with:

    Code:
    $temp_string = explode("&", zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')));
    if (substr($temp_string[0], 0, 5) == 'cPath') {
      $link = '<a href="http://www.yourdomainname.com/index.php?main_page=index&' . $temp_string[0] . '">';
    } else {
      $link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
    }
    This is what I wrote to accomplish the task... basically if there is a "cPath" at the start of the $_SESSION['navigation']->path[$back]['get'] variable, I return to it, otherwise it continues as normal. Replace "yourdomainname.com" with your domain obviously. There is a better way to put the website name in there, but I was lazy :-P. Maybe I'll go do that now...

    Make sure you test extensively, I run a simple website with most things disabled, no sidebars, etc.

    Hope that helps. Use at your own risk, make backups, etc. :-)

    Lightus

  2. #12
    Join Date
    Jul 2009
    Posts
    7
    Plugin Contributions
    1

    Default Re: 'Continue shopping' link in shopping cart

    This worked for me. Brings me back to the point where I was in the listing:
    replace(line 994ish):
    Code:
    $link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
    with:
    Code:
          $temp_string = zen_array_to_string($_SESSION['navigation']->path[0]['get'], array('action'));
          $temp_string2 = explode("&", $temp_string);
          if (substr($temp_string2[0], 0, 5) == 'cPath') {
            $link = '<a href="http://'.$_SERVER[HTTP_HOST].$_SERVER[PHP_SELF].'?main_page=index&' . $temp_string . '">';
          } else {
            $link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
          }

  3. #13
    Join Date
    Oct 2008
    Posts
    254
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    Anyone here that can help me get this code working for 1.3.9? I get PHP Parse error: syntax error, unexpected T_ELSE in /includes/functions/functions_general.php on line 1016.

    Thanks

  4. #14
    Join Date
    Jul 2010
    Posts
    79
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    Nevermind.
    Last edited by FragaGeddon; 30 Sep 2010 at 01:56 PM.

  5. #15
    Join Date
    Jul 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    I replace the code lightus suggested but it just broke.
    javaman code didn't break but doesn't work either.

    Does any one solve this problem? Or simply can't do it?

  6. #16
    Join Date
    Jan 2011
    Posts
    26
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    For me it seems work, I am using 1.3.9h
    I am using the javaman mod, but I had to change something to it, otherwise I was connected to http://mysite/<a href

    here it is (javaman's code with a little mod):

    Code:
    $temp_string = zen_array_to_string($_SESSION['navigation']->path[0]['get'], array('action'));
          $temp_string2 = explode("&", $temp_string);
          if (substr($temp_string2[0], 0, 5) == 'cPath') {
            $link = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[PHP_SELF].'?main_page=index&' . $temp_string;
          } else {
            $link = zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']);
          }

  7. #17
    Join Date
    Jan 2011
    Posts
    26
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    PS: Thanks for the solution, Javaman!

  8. #18
    Join Date
    Jan 2011
    Posts
    26
    Plugin Contributions
    0

    Default Re: 'Continue shopping' link in shopping cart

    minor update

    Code:
    $temp_string = zen_array_to_string($_SESSION['navigation']->path[0]['get'], array('action'));
          $temp_string2 = explode("&", $temp_string);
          if (substr($temp_string2[0], 0, 5) == 'cPath') {
            $link = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[PHP_SELF].'?main_page=index&amp;' . $temp_string;
          } else {
            $link = zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']);
          }
    (changed & by &amp; in the link)

  9. #19
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: 'Continue shopping' link in shopping cart

    Quote Originally Posted by luciano9876 View Post
    minor update

    Code:
    $temp_string = zen_array_to_string($_SESSION['navigation']->path[0]['get'], array('action'));
          $temp_string2 = explode("&", $temp_string);
          if (substr($temp_string2[0], 0, 5) == 'cPath') {
            $link = 'http://'.$_SERVER[HTTP_HOST].$_SERVER[PHP_SELF].'?main_page=index&' . $temp_string;
          } else {
            $link = zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']);
          }
    (changed & by & in the link)
    How would I get this working on 1.5.5e please?
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  10. #20
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 'Continue shopping' link in shopping cart

    Quote Originally Posted by Nick1973 View Post
    How would I get this working on 1.5.5e please?
    Given that the code is pretty much the same, you'd make the same change, but the code change is at line 1033.

    (I've not tested it, but that's where the code has moved to, and if the change worked "before", the same change should work in v155 too.)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Shopping Cart - continue shopping
    By tkelley66 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Oct 2008, 02:03 PM
  2. Continue Shopping Link on EZ-Pages
    By vitalwares in forum General Questions
    Replies: 1
    Last Post: 29 Feb 2008, 01:34 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