Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: set_snapshot

    Quote Originally Posted by DigitalShadow View Post
    the snapshot page is showing as correct, but it seems to want to place the page on a base path that needs to be set.
    Alternatively, you could emulate the zen_back_link function and if the $page['page'] variable is set as you have done above without the first slash, then if you created your zen_href_link with $static set to true instead of the default false, then yes you could leave the file where it is and the email link the way it is... But that all centers around how the user gets from the link, to login, and back to the link...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #22
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: set_snapshot

    There's also a notifier in includes/modules/pages/login/header_php.php that could be used to identify the presence of that page in the navigation_history and redirect to it yourself in that observer...

    Code:
    $zco_notifier->notify('NOTIFY_LOGIN_SUCCESS');
    Or modify the above header file directly to "listen" for this "event" and redirect to the page you are trying to access instead of what it currently does...

    Just some thoughts.

    I'd suggest the notifier instead to save sanity on upgrades, but...
    Last edited by mc12345678; 6 Aug 2015 at 04:46 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #23
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: set_snapshot

    If i do nothing and just

    Code:
    echo $_SESSION['navigation']->debug();
    then it shows on page load

    index?order_id=35041&
    if i then add

    Code:
    $_SESSION['navigation']->set_snapshot(); echo $_SESSION['navigation']->snapshot['page'];
    then it shows on page load

    index?order_id=35041&

    SSL index?order_id=35041
    index
    and redirects to

    domain.here/?order_id=35041&
    So it has redirected to a page without index.php

    How do I fill out the array information correctly to modify the page information without injecting back in the index.php

  4. #24
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: set_snapshot

    See the code referenced above, includes/functions/functions_general.php and html_output.php play into this having each of the above functions: zen_back_link and zen_href_link respectively.

    After looking at the code as it stands, there is no information that can be provided to set_snapshot that would take to a different location other than YOURSITE/index.php.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #25
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: set_snapshot

    If I could inject something into

    Code:
    $get_vars[$key] = $value;
    It might work

  6. #26
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: set_snapshot

    I've tried, I managed to modify the $_GET to create a url, but the best I have managed is

    domain.here/?order_question.php?order_id=35041

    the ? obviously is the problem, and I don't think that can be removed without changing navigation_history.php and that was another thing I wanted to avoid.

    Oh well... moving it to a custom page it is....

  7. #27
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: set_snapshot

    Quote Originally Posted by DigitalShadow View Post
    If I could inject something into

    Code:
    $get_vars[$key] = $value;
    It might work
    That portion is related to the parameters on the uri. Which would requre a redirect type key that doesn't exist/work.

    There are a number of ways it could be addressed though... :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #28
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: set_snapshot

    that doesn't involve moving the module to a custom page?

  9. #29
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: set_snapshot

    Quote Originally Posted by DigitalShadow View Post
    that doesn't involve moving the module to a custom page?
    Here's my thought. You already have the ability to set the page to which toreturn... So, the header of that page should have a redirect to your desired code... No additional tpl files necessary, just the FILENAME_XXX definition, and a header_php.php file in the appropriate pages directory for the "new" page...

    As written right now, click on link in email, goes to file, file checks for login status, if not logged in, set "new" page, goto login, when done go to new page, new page redirects back to file, check for login, logged in, continue transaction.

    Just need to be sure to maintain the uri parameters (get info) along the way...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: set_snapshot

    Note: The navigation-history code which does the snapshots was never designed to handle files that originate from someplace other than index.php?main_page=(something). That's why you're running into these difficulties.

    I would recommend this to be the simplest approach:

    a. create a custom page which is accessed via index.php?main_page=custom_page_name (it can take a snapshot and restore it after login, the same as the My Account or Checkout pages do)

    b. in your apache .htaccess set a Redirect rule to send /custom_page.php to index.php?main_page=custom_page_name ... this way you can use the fancy short URL you've wanted since your first post, and the server will auto-send them to the correct "real" place where that page operates from.

    Then all the snapshot logic should work without requiring complicated rewrites to its logic.
    .

    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 3 of 3 FirstFirst 123

Similar Threads

  1. what is set_snapshot function use for ?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 29 Oct 2012, 02:05 AM
  2. Want to use index.php as a splash page...how?
    By laurenjj in forum Basic Configuration
    Replies: 8
    Last Post: 7 Sep 2011, 06:01 AM
  3. where can i find this link "/index.php?main_page=index&cPath=1"?
    By hangman21 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Jul 2010, 04:15 AM
  4. Session info not updating for scripts outside of ZC folder after upgrade to 1.39
    By steel-track in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 15 May 2010, 06: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