Zen Cart Logo
Forums / General Questions / Adding a Variable to the URL at Checkout Success

Adding a Variable to the URL at Checkout Success

Locked

Views: 2,723

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
12 Oct 2006, 7:14 PM
#1
kamino84 avatar

kamino84

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

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

12 Oct 2006, 10:08 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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:```
zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));


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

13 Oct 2006, 12:20 PM
#3
kamino84 avatar

kamino84

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

Re: Adding a Variable to the URL at Checkout Success

That doesnt work. I do this:

$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

27 Oct 2006, 7:12 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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?
27 Oct 2006, 9:00 PM
#5
kamino84 avatar

kamino84

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

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.

28 Oct 2006, 9:57 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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:zen_redirect(zen_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));to this:```
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.
29 Oct 2006, 3:21 AM
#7
kamino84 avatar

kamino84

New Zenner

Join Date:
Aug 2006
Posts:
80
Plugin Contributions:
0

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.