X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Easy Checkout Mod for X-Cart 3.5.x and 4.0.x (https://forum.x-cart.com/showthread.php?t=9085)

Jon 09-23-2004 09:44 AM

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%"}


Jon 09-23-2004 09:45 AM

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.

cotc2001 09-23-2004 09:49 AM

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

rjcbear 09-23-2004 09:54 AM

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

Jon 09-23-2004 09:55 AM

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.

Jon 09-23-2004 10:01 AM

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}


B00MER 09-27-2004 07:27 AM

:!: Moved to Custom Mods & Template forum.

Jon 09-27-2004 07:51 AM

Thanks BOOMER :)

adpboss 10-01-2004 05:44 PM

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.

adpboss 10-01-2004 05:47 PM

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

BAD ADPBOSS. VERY BAD.


All times are GMT -8. The time now is 12:03 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.