CRE Loaded Community

Banner


Board index » Loaded Commerce Support » Tips & Tricks

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Fix: Sagepay UK Form problems - Cre 6.4.1
PostPosted: Sun Nov 07, 2010 3:33 am 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2394
Location: New Zealand
Hello,

There are several posts floatin around about problems with the Sage Pay UK Form module with all versions of Cre Loaded 6.4.1 CE/Pro/B2B.

This post attempts offers one solution to a particular problem and has a couple of other pointers too.

1. Sage Pay module to use
Download the latest osCommerce Sage Pay Form module - you need the includes/modules/payment/sage_pay_form.php and the language file which goes to includes/languages/english/modules/payment/sage_pay_from.php.

2. Make the following mods (as per post from aitsglobal here in particular the post dated July 16th 2010, if you use coupons.) You don't need to change anything in the osCommerce sage_pay_form.php module itself otherwise.

3. If you use the standard 3-page checkout (so all CE users ... this problem DOESN'T AFFECT One Page Checkout), the following will apply:

>> enctype="multipart/form-data"
This is part of Cre code for form submissions, including payment modules. Why I'm not sure as it's meant to be for <input> fields involving files. It breaks this Sagepay form so best avoided. The code change below removes this enctype ONLY from your sage_pay_form submission (so if you're using other payment modules they'll be unaffected.)

To fix:
templates/content (or templates/your template/content possibly) and find checkout_confirmation.tpl.php around line 277 (in CE version)

Looks like this:
Code:
if (ACCOUNT_CONDITIONS_REQUIRED == 'false' ) {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','enctype="multipart/form-data"');
          } else {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)" enctype="multipart/form-data"');
          }

Replace with this:
Code:
if ((ACCOUNT_CONDITIONS_REQUIRED == 'false' ) && ($_SESSION['payment'] == 'sage_pay_form')) {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
          } elseif ((ACCOUNT_CONDITIONS_REQUIRED == 'true' ) && ($_SESSION['payment'] == 'sage_pay_form')) {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)"');
          } elseif (ACCOUNT_CONDITIONS_REQUIRED == 'false') {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','enctype="multipart/form-data"');
          } else {
            echo tep_draw_form('checkout_confirmation', $form_action_url, 'post','onsubmit="return checkCheckBox(this)" enctype="multipart/form-data"');
          }


4. Admin >> Modules >> Payment

If you want to try out the Sagepay system first, I'd recommend getting a Simulator account and testing a few orders. If you have 'Transaction Server = Simulator' set, make sure you have a free Sagepay Simulator account setup because the Encryption Password is for the Simulator itself.

If you already have a Live account with Sagepay your encryption password should work. A Simulator password won't work with a Live account of course.

5. Setup your Sagepay account
It's worth checking all the settings from the Sagepay side of things too, including accepted currencies.

Hope this helps!
Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
 Post subject: Re: Fix: Sagepay UK Form problems - Cre 6.4.1
PostPosted: Mon Nov 08, 2010 9:23 am 
Offline
CRE Freak
User avatar

Joined: Tue Jan 06, 2009 4:57 pm
Posts: 72
Simon you are a legend, that worked perfectly. I and I am sure many others really appreciate the effort you put in to pull that fix together.

I just have one question. When the email notfification came through, the formatting on the prices looked like this

Quote:
1 x Flight and Smoke () = &#163;7.99
1 x Oogly es Sin () = &#163;4.95
------------------------------------------------------
World Zone Rates (Shipping to United Kingdom: 208 lb(s)): &#163;0.00
Sub-Total: &#163;12.94
Total: &#163;12.94


The £ replaced by &# and a ; instead of a :

Would the change you made to checkout have caused this? or is this something else?


Top
 Profile  
 
 Post subject: Re: Fix: Sagepay UK Form problems - Cre 6.4.1
PostPosted: Mon Nov 08, 2010 4:44 pm 
Offline
CRE Legend
User avatar

Joined: Thu Jun 12, 2008 6:39 am
Posts: 2394
Location: New Zealand
Admin >> Configuration > Email Options ... try setting HTML Emails to yes.
Simon

_________________
www.codemehappy.com
For Cre Loaded tips, how-to articles and more


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Board index » Loaded Commerce Support » Tips & Tricks

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Thu May 17, 2012 9:54 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy