Forums / General Questions / Updating Shipping/Insurance on Checkout Redirects to Home

Updating Shipping/Insurance on Checkout Redirects to Home

Locked

Views: 1,197

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Jul 2009, 2:49 AM
#1
chcholman avatar

chcholman

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Updating Shipping/Insurance on Checkout Redirects to Home

Hi - I have been working on upgrading a site from 1.3.7 to 1.3.8, and we've got everything pretty close to finish except this last glitch.

We are using Fast and Easy Checkout, and on the Checkout page if the user clicks any of the things that have updateForm functions on them, they redirect to the frontpage of the website instead. No error message, just a total redirect.

Items with updateForm(): optional shipping insurance (a checkbox), and the different shipping options.

Anything without the updateForm() function (like the payment choice) don't cause a problem. If you don't switch the shipping type, or don't add insurance, you can checkout no problem. I've installed the Debug Error Logging Utility and it's not coming up with anything on this (it's been great with other problems though, thanks to DrByte for that!!).

Mods that are installed:
Optional Shipping Insurance
Monthly Sales
Fual Slimbox
Google Analytics
Restock Requests
USPS Autofill
Cross-Sell/Advanced Cross-Sell
Fast and Easy Checkout/COWOA

Thank you for any advice in advance, this is driving me crazy!

--Caitlin

14 Jul 2009, 10:57 AM
#2
chcholman avatar

chcholman

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Re: Updating Shipping/Insurance on Checkout Redirects to Home

The website is here if anyone has ideas or even suggestions as to how to continue on trying to figure out the issue:

https://www.mygrowingtraditions.com/wish/

thanks...
cait

17 Jul 2009, 2:58 AM
#3
chcholman avatar

chcholman

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Re: Updating Shipping/Insurance on Checkout Redirects to Home

Follow-up: I have an amazing friend who helped sort this out. Turns out there was a conflict between the FEC mod and the most recent security patch. The updateForm() function doesn't process properly with the new security in place. Our fix was to change the name of part of the function, and this has to be done in two FEC files.

includes/modules/pages/checkout/header_php.php:

Look for line 305:

  switch ($_GET['action']) {
  case 'update': 
    $form_action_url = zen_href_link(FILENAME_CHECKOUT, '', 'SSL');   
    if (zen_not_null($_POST['comments'])) {
      $_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
    }

and change the name of the case 'update' to something else (something that makes sense, and doesn't conflict with anything else going on)

also change the updateForm function in includes/modules/pages/checkout/jscript_main.php:

function updateForm() {
    document.forms['checkout_payment'].action = "index.php?main_page=checkout&action=update";
    document.forms['checkout_payment'].submit();             // Submit the page
}

Change the "index.php?main_page=checkout&action=update" - replacing the word 'update' to match the change you made in the first file. I changed them to 'upship' because it was shipping cost that I wanted to update on the page. I hope if anyone else stumbles into this issue this will help!