Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    76
    Plugin Contributions
    0

    Default Adding a Variable to the URL at Checkout Success

    Hey,

    I have a question. I need to add the order total and another varible into the url for when they hit the checkout_success page. What file would i make that change in?

    Thanks
    kamino

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Adding a Variable to the URL at Checkout Success

    To add variables to that particular URL, you would edit:
    /includes/modules/pages/header_php.php
    around line 32:
    Code:
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
    Insert your extra variables inside the '' quotes:

    Code:
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, 'var1=abc&var2=xyz&var3=qrs', 'SSL'));
    .

    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.

  3. #3
    Join Date
    Aug 2006
    Posts
    76
    Plugin Contributions
    0

    Default Re: Adding a Variable to the URL at Checkout Success

    That doesnt work. I do this:

    Code:
    $total = $_SESSION[order_amount];
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, "ototal=$total", 'SSL'));
    And i still do not get that variable in the url on the final checkout_success page.


    Any ideas?


    Kamino84

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Adding a Variable to the URL at Checkout Success

    1. which payment module are you using?
    2. I see I didn't give a complete path to the file to edit. Which header_php.php file did you edit?
    .

    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.

  5. #5
    Join Date
    Aug 2006
    Posts
    76
    Plugin Contributions
    0

    Default Re: Adding a Variable to the URL at Checkout Success

    I am using the AuthNet Payment Module, and i edited the file in the checkout_success folder within the pages folder.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Adding a Variable to the URL at Checkout Success

    From Zen Cart v1.3.6:
    /includes/modules/pages/checkout_process/header_php.php
    line 32:
    change this:
    Code:
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
    to this:
    Code:
      zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, "ototal=$order_subtotal&credits=$credits_applied&comm=$commissionable_order", 'SSL'));
    Now place a new order and look at the URL on the checkout_success page.
    .

    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.

  7. #7
    Join Date
    Aug 2006
    Posts
    76
    Plugin Contributions
    0

    Default Re: Adding a Variable to the URL at Checkout Success

    I did that and nothing shows in the URL but i am currently using Zen Cart 1.3.0.1
    Database Patch Level: 1.3.0.1. So i am not sure whats wrong. I did find another post on the boards and installed JAM Affiliate Program and it works great with Zencart. But i still need the vars in the URL for tracking purposes.

 

 

Similar Threads

  1. How do I format the Checkout Success page?
    By rcnenni in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Jan 2014, 01:19 AM
  2. Replies: 3
    Last Post: 24 Oct 2012, 02:56 PM
  3. where is the checkout success page??
    By humbll in forum General Questions
    Replies: 4
    Last Post: 11 Oct 2007, 03:00 AM
  4. Checkout Success Parse Error, on the Japanese side...
    By Peace Freak in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 16 Aug 2006, 03:57 PM

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