Skipjack for multiple zen carts
Hi,
I am trying to create a way for a single skipjack account to process orders from multiple zen carts. Within skipjack, there are 2 ways to direct customers to response files. The default lets you create your own response page, but does not follow through the checkout_process page, within zen cart, which is necessary for the correct emails to be sent out with the correct order information (also needed to clear the shopping cart). So, you would normally insert "www.yourdomain.com/index.php?main_page=checkout_process" into the 2nd option, which works fine for 1 zen cart. This is where my questions come in play:
Does skipjack simply redirect you to that page?
I have created an html page that uses javascript to create a URL using the referring page (previous page) so the URL will be specific to the website being ordered from. The function copies everything up to the "=" of the URL (i.e. "https://www.yourdomain.com/index.php?main_page=") and then adds "checkout_process" to the end. The html page then redirects you to the new URL. In theory, this should work.
However, when I process an order, it goes through in skipjack, but once redirected back to your zen cart, you are returned to confirmation page 2 of 3 with an error.
What code within zen cart creates the error? Can I simply create a new checkout_process page to skip the check that would result in this error?
Let me know what you think. I'm sure this could help out a lot of people who have multiple zen carts and use skipjack. I would hate to have to pay for 100+ skipjack accounts, since the zen carts I am creating are for local schools (a lot of them).
Thank you,
John
Re: Skipjack for multiple zen carts
The exact error I'm getting is "There has been an error processing your credit card. Please try again."
I am being redirected to the following page:
index.php?main_page=checkout_payment&error_message=There+has+been+an+error+proce ssing+your+credit+card.+Please+try+again.
Re: Skipjack for multiple zen carts
Re: Skipjack for multiple zen carts
SOLVED!! The skipjack module in folder \includes\modules\payment\skipjack.php around line 246 thru 252 has the code to throw the error. I commented out the code for now as a temporary fix. Will have to figure out why the error is being thrown in the first place and correct that in the future.
BUT, for now, I have created a way to use skipjack for any number of zen carts. I would have shared this information, but no one helped me..... just kidding. I know this can help a lot of users.
In Skipjack:
Preferences -> Response Files
Use Response Files (Default)
Add the following javascript code:
Code:
<SCRIPT LANGUAGE="JavaScript">
function checkout() {
var prevURL = document.referrer;
var stop = prevURL.indexOf('=');
var newURL = "";
for (count = 0; count <= stop; count++)
{
newURL += prevURL.charAt(count);
}
newURL += "checkout_process";
window.location = newURL;
}
</SCRIPT>
<body onLoad="setTimeout('checkout()', 3000)" bgcolor="#FFFFFF" link="#FF0000" vlink="#000000" alink="#FF9900">
copy the above javascript code over the <body .....> code within the response file. Or make sure to add onLoad="setTimeout('checkout()', 3000)" into the body code. The 3000 means that the response file will be displayed for 3 seconds before being redirected.
Now, within the above mentioned skipjack file. You will need to navigate to "function before_process()" (line 246 in my skipjack.php file). Within that function, comment out the if statement so that it skips the error check.
Make sure to only add the javascript to the "Thank You For Your Order" response file, as this code will complete transactions even if credit cards are denied.
I will be researching a fix for the error and hopefully post back soon.
-John
SOLVED:: Skipjack for Multiple Zen Carts ::SOLVED
Just wanted to get the word out.
refer to:
http://www.zen-cart.com/forum/showthread.php?t=127956
Let me know if you have any questions or suggestions on a permanent fix.
Thanks,
John
Re: Skipjack for multiple zen carts
I found out what the problem is with the error received when using the unedited skipjack.php file. The javascript code that I have added to the response file within skipjack does not send the $_POST array with it. How can I make sure the variables that skipjack sends with the response file are also being redirected to the checkout_process page?
Any help would be greatly appreciated.
Thanks,
John
Re: Skipjack Module problems
Just a me to post. Any help with this yet?
Re: Skipjack for multiple zen carts
Is anyone still working on solving this or is this mod a dead project?