Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Easy Checkout Mod for X-Cart 3.5.x and 4.0.x

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #111  
Old 09-23-2004, 09:44 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Quote:
Originally Posted by rjcbear
Yes Jon. I think that will help alot.

Kind regards,
Ricky

If you post up your full checkout.tpl I'll modify it for you. Otherwise, use this code as a basis (I've modified mine so there may be changes)

Note that this is going to move the payment method above for all payment methods, not just the gift certificates.

FIND THIS CODE IN skin1/customer/main/checkout.tpl

Code:
{capture name=dialog} <table border=0 cellpadding=0 cellspacing=0 width=100%> <form action="{$payment_data.payment_script_url}" method=post name=checkout_form> <input type=hidden name=action value="place_order"> <tr><td> <input type=hidden name={$XCARTSESSNAME} value={$XCARTSESSID}> {if $payment_data.payment_template ne ""} {include file=$payment_data.payment_template} {/if} {include file="customer/main/checkout_notes.tpl"} <input type=hidden name=payment_method value="{$payment_data.payment_method}"> {$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}". <p align=center> {if $js_enabled} {include file="buttons/submit_order.tpl" style="button"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if} </td></tr> </form> </table> {if $ignore_payment_method_selection eq ""} {/if} {/capture} {include file="dialog.tpl" title=$payment_data.payment_method content=$smarty.capture.dialog extra="width=100%"}

CUT AND PASTE IT IN THE FILE ABOVE THIS CODE:

Code:
{capture name=dialog} {include file="customer/main/customer_details.tpl"} {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_details content=$smarty.capture.dialog extra="width=100%"}
Reply With Quote
  #112  
Old 09-23-2004, 09:45 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Quote:
Originally Posted by cotc2001
Still havent played with x-cart 4.0.x yet to try this one out, but wouldnt it be better to always have the gift voucher box available at checkout regardless of it was chosen as a payment method.

so customer would goto checkout and if all other methods of payment was hidden so that credit card is the only one used they go straight to credit card payment, on there is a input box for gift certificate along with other usuel stuff, if they enter gift certificate page refreshes and then shows the amount paid via gift cert and then carries on as normal.

I agree. I liked it much better when gift certificates were handled in the same fashion as discounts. It seems this would be a lot of work to change this now.
Reply With Quote
  #113  
Old 09-23-2004, 09:49 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

Oh right so it did acutally used to do this then??? and they've dropped it for 4.0.x versions. Didn't know that as I've only just started playing with the GC's
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #114  
Old 09-23-2004, 09:54 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Quote:
If you post up your full checkout.tpl I'll modify it for you. Otherwise, use this code as a basis (I've modified mine so there may be changes)

Note that this is going to move the payment method above for all payment methods, not just the gift certificates.

FIND THIS CODE IN skin1/customer/main/checkout.tpl

Here it is.

Code:
{* $Id: checkout.tpl,v 1.37 2003/11/17 12:10:16 mclap Exp $ *} {include file="location.tpl" last_location=$lng.lbl_payment_details} {if $payment_data.payment_method ne ""} <h5>{$lng.lbl_payment_method}: {$payment_data.payment_method}</h5> {capture name=dialog} <table border=0 cellpadding=0 cellspacing=0 width=100%> <form action="{$payment_data.payment_script_url}" method=post name=checkout_form> <input type=hidden name=action value="place_order"> <tr><td> <pre> <font> {include file="customer/main/customer_details.tpl"} </font> </pre> {include file="buttons/modify.tpl"} {if $ignore_payment_method_selection eq ""} <div align=right> {include file="buttons/change_payment_method.tpl"} </div> {/if} <input type=hidden name={$XCARTSESSNAME} value={$XCARTSESSID}> {if $payment_data.payment_template ne ""} {include file=$payment_data.payment_template} {/if} {include file="customer/main/checkout_notes.tpl"} <input type=hidden name=payment_method value="{$payment_data.payment_method}"> {$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}". <p align=center> {if $js_enabled} {include file="buttons/submit_order.tpl" style="button"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if} </td></tr> </form> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_details content=$smarty.capture.dialog extra="width=100%"} {elseif $payment_methods ne ""} {capture name=dialog} <form method=get action="cart.php" name=checkout_form> {$lng.txt_payment_method}</p> <table border=0 align=center> {section name=payment loop=$payment_methods} <tr> <td width=1><input type=radio name=paymentid value={$payment_methods[payment].paymentid}{if $payment_methods[payment].is_default eq "1"} checked{/if}></td> <td nowrap>{$payment_methods[payment].payment_method} </td> <td>{$payment_methods[payment].payment_details}</td> </tr> {/section} <input type=hidden name=mode value=checkout> </table> <div align=center> {if $js_enabled} {include file="buttons/continue.tpl" style="button"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_continue} {/if} </div> </form> {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_method content=$smarty.capture.dialog extra="width=100%"} {/if}

Thank you
Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11
Apache Version 1.3.29 (Unix)
EWDHosting-Quality X-cart Hosting
We will always sell you the right shoe and the left one is free.
Reply With Quote
  #115  
Old 09-23-2004, 09:55 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Quote:
Originally Posted by cotc2001
Oh right so it did acutally used to do this then??? and they've dropped it for 4.0.x versions. Didn't know that as I've only just started playing with the GC's

Not sure exactly what versions handle it what ways, but I know in the 3.2 branch gift certificates were done like discounts, the problem was that you couldn't use a gift certificate to partially pay for an order, so if your gift certificate didn't cover the full cost of your order, you were out of luck. I'm making the assumption that they changed the method to account for this, but I could likely be wrong.
Reply With Quote
  #116  
Old 09-23-2004, 10:01 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Ricky, try this. Be sure to backup first!

Code:
{* $Id: checkout.tpl,v 1.37 2003/11/17 12:10:16 mclap Exp $ *} {include file="location.tpl" last_location=$lng.lbl_payment_details} {if $payment_data.payment_method ne ""} {* HERE WE HAVE A PAYMENT METHOD SELECTED ALREADY *} {* Show the make payment form *} {capture name=dialog} <form action="{$payment_data.payment_script_url}" method=post name=checkout_form> <input type=hidden name={$XCARTSESSNAME} value={$XCARTSESSID}> {if $payment_data.payment_template ne ""} {include file=$payment_data.payment_template} {/if} {include file="customer/main/checkout_notes.tpl"} <input type=hidden name=payment_method value="{$payment_data.payment_method}"> {$lng.txt_you_are_agree} "{$lng.lbl_terms_n_conditions}" {$lng.lbl_and} "{$lng.lbl_privacy_statement}". <p align=center> {if $js_enabled} {include file="buttons/submit_order.tpl" style="button"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit_order} {/if} </td></tr> </form> </table> {/capture} {include file="dialog.tpl" title=$payment_data.payment_method content=$smarty.capture.dialog extra="width=100%"} {* Show the payment details *} {capture name=dialog} <table border=0 cellpadding=0 cellspacing=0 width=100%> <input type=hidden name=action value="place_order"> <tr><td> <pre> <font> {include file="customer/main/customer_details.tpl"} </font> </pre> {include file="buttons/modify.tpl"} {if $ignore_payment_method_selection eq ""} <div align=right> {include file="buttons/change_payment_method.tpl"} </div> {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_details content=$smarty.capture.dialog extra="width=100%"} {elseif $payment_methods ne ""} {* HERE THEY SELECT THEIR PAYMENT METHOD *} {capture name=dialog} <form method=get action="cart.php" name=checkout_form> {$lng.txt_payment_method}</p> <table border=0 align=center> {section name=payment loop=$payment_methods} <tr> <td width=1><input type=radio name=paymentid value={$payment_methods[payment].paymentid}{if $payment_methods[payment].is_default eq "1"} checked{/if}></td> <td nowrap>{$payment_methods[payment].payment_method} </td> <td>{$payment_methods[payment].payment_details}</td> </tr> {/section} <input type=hidden name=mode value=checkout> </table> <div align=center> {if $js_enabled} {include file="buttons/continue.tpl" style="button"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_continue} {/if} </div> </form> {/capture} {include file="dialog.tpl" title=$lng.lbl_payment_method content=$smarty.capture.dialog extra="width=100%"} {/if}
Reply With Quote
  #117  
Old 09-27-2004, 07:27 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Moved to Custom Mods & Template forum.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #118  
Old 09-27-2004, 07:51 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Thanks BOOMER
Reply With Quote
  #119  
Old 10-01-2004, 05:44 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Jon,

I was just about to implement this on my development store when I realised that the latest version is 4.0.3 and I am running 4.0.4.

Needless to say that with the # of changes due to happen to the 4.0.x version, using your files could pose a compatability problem down the road.

Would you be willing to comment the code to identify exactly where your changes are so that upgrading or integrating into a later version would be smoother? I am willing to pay for this, as updating your files to 4.0.4 will only cause a problem with the next user who buys this mod for 4.0.5+ and create a load of extra work for you to maintain so many different versions.

If you want to discuss a cost via PM that would be great.
Reply With Quote
  #120  
Old 10-01-2004, 05:47 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Disregard previous post. I guess I should RTFM because the custom installation notes are excellent.

BAD ADPBOSS. VERY BAD.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:24 PM.

   

 
X-Cart forums © 2001-2020