Totally Zenned
- Join Date:
- Jan 2015
- Posts:
- 784
- Plugin Contributions:
- 0
Variables that are passed to define_checkout_success.php
Zencart 2.1
php 8.2
OPC 2.5.4
I just upgraded my website from 1.5.8 to 2.1.
I have a shopper approved script I use for Variables that are passed to define_checkout_success.php
I always use these variables as indicated in the script
orders_id: <?php echo $orders->fields['orders_id'] ?>
Name: <?php echo $orders->fields['customers_name'] ?>
Email: <?php echo $orders->fields['customers_email_address'] ?>
<!-- shopper approved survey Script -->
<script type="text/javascript"> var sa_values = { "site":xxxxxx, "token":"xxxxxx", 'orderid':'<?php echo $orders->fields['orders_id'] ?>', 'name':'<?php echo $orders->fields['customers_name'] ?>', 'email':'<?php echo $orders->fields['customers_email_address'] ?>' }; function saLoadScript(src) { var js = window.document.createElement("script"); js.src = src; js.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(js); } var d = new Date(); if (d.getTime() - 172800000 > 1477399567000) saLoadScript("https://www.shopperapproved.com/thankyou/ratexxx.js?d=" + d.getTime()); else saLoadScript("//direct.shopperapproved.com/thankyou/rate/10324.js?d=" + d.getTime()); </script>
I am getting an error from the variables can someone assist me or lead me in the right direction in solving this issue
[01-Dec-2024 02:21:02 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=checkout_success, IP address: 127.0.0.1, Language id 1
#0 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php(100): zen_debug_error_handler()
#1 C:\xampp\htdocs\xxx.com\includes\modules\pages\checkout_success\main_template_vars.php(15): require('C:\xampp\htdocs...')
#2 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\common\tpl_main_page.php(285): require('C:\xampp\htdocs...')
#3 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\xampp\htdocs...')
--> PHP Warning: Undefined variable $orders in C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php on line 100.
[01-Dec-2024 02:21:02 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=checkout_success, IP address: 127.0.0.1, Language id 1
#0 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php(100): zen_debug_error_handler()
#1 C:\xampp\htdocs\xxx.com\includes\modules\pages\checkout_success\main_template_vars.php(15): require('C:\xampp\htdocs...')
#2 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\common\tpl_main_page.php(285): require('C:\xampp\htdocs...')
#3 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\xampp\htdocs...')
--> PHP Warning: Attempt to read property "fields" on null in C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php on line 100.
[01-Dec-2024 02:21:02 Europe/Berlin] Request URI: /xxx.com/index.php?main_page=checkout_success, IP address: 127.0.0.1, Language id 1
#0 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php(100): zen_debug_error_handler()
#1 C:\xampp\htdocs\xxx.com\includes\modules\pages\checkout_success\main_template_vars.php(15): require('C:\xampp\htdocs...')
#2 C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\common\tpl_main_page.php(285): require('C:\xampp\htdocs...')
#3 C:\xampp\htdocs\xxx.com\index.php(94): require('C:\xampp\htdocs...')
--> PHP Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\xxx.com\includes\templates\bootstrap\templates\tpl_checkout_success_guest.php on line 100.