X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   easy simplify checkout mod (https://forum.x-cart.com/showthread.php?t=12382)

1day2004 01-20-2006 11:59 AM

Realsecurity,

on Step 1 of your Checkout...how did you integrate the "Existing customers Login Here" section?

Was it a mod from this forum?

Thanks.

Multitoolstore 02-01-2006 11:57 AM

Quote:

Originally Posted by 1day2004
Realsecurity,

on Step 1 of your Checkout...how did you integrate the "Existing customers Login Here" section?

Was it a mod from this forum?

Thanks.


You can do this based on the standard auth template in 4.0.17 and i am pretty sure it also works in earlier versions, just create a new template called something like checkout_login.tpl then enter the code below.

Code:

{$lng.txt_checkout_register}



{capture name=dialog}
<TABLE border="0">
{if $config.General.use_https_login eq "Y" and $usertype eq "C"}
{assign var="form_url" value=$https_location}
{else}
{assign var="form_url" value=$current_location}
{/if}
<FORM action="{$form_url}/include/login.php" method="post" name=errorform>
<TR>
<TD height="10" width="78" class="FormButton">{$lng.lbl_login}</TD>
<TD width="10" height="10"><FONT class="Star">*</FONT></TD>
<TD width="282" height="10">
  <div align="left">
    <INPUT type="text" name="username" size="30">
  </div></TD>
</TR>
<TR>
<TD height="10" width="78" class="FormButton">{$lng.lbl_password}</TD>
<TD width="10" height="10"><FONT class="Star">*</FONT></TD>
<TD width="320" height="10">
  <div align="left">
    <INPUT type="password" name="password" size="30">
    Forgotten password?{if $active_modules.Simple_Mode ne "" and $usertype ne "C" and $usertype ne "B"}
    <INPUT type="hidden" name="usertype" value="P">
  {else}
  <INPUT type="hidden" name="usertype" value="{$usertype}">
  {/if}
  <INPUT type="hidden" name="redirect" value="{$redirect}">
  <INPUT type="hidden" name="mode" value="login">
  </div></TD>
</TR>
<TR>
<TD height="10" width="78" class="FormButton"></TD>
<TD width="10" height="10"></TD>
<TD width="320" height="10" class="ErrorMessage">
  <div align="left">{ if $main eq "login_incorrect"}
  {$lng.err_invalid_login}
  {/if} </div></TD>
</TR>
<TR>
<TD height="10" width="78" class="FormButton"></TD>
<TD width="10" height="10" class="FormButton"></TD>
<TD width="320" height="10">
  <div align="left">{if $js_enabled}
  {include file="buttons/submit.tpl" href="javascript:document.errorform.submit()" js_to_href="Y"}
  {else}
  {include file="submit_wo_js.tpl" value=$lng.lbl_submit}
  {/if} </div></TD>
</TR>
</FORM>
</TABLE>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_existingcustomer content=$smarty.capture.dialog extra="width=100%"}


Then just add an include statement as below where ever you want it to go within your checkout.

Code:

{include file="main/checkout_login.tpl"}

RoboDad 03-03-2006 11:38 PM

I just found this checkout_login mod, and added it to my anonymous_checkout.tpl, and it works great, unless the user enters an incorrect password. When that happens, the user gets redirected to error_message.php, and I haven't been able to find out where this is happening, or how to redirect them back to cart.php.

Any ideas on where to look?

rgbman 03-27-2006 07:42 PM

I have this mod installed currently.

After someone hits continue after typing in their shipping address, the real time UPS quote comes back suggesting a new location. The reason it is doing this is because the state information the customer just put is not being transferred to UPS.
It is trying to figure out that address without the state. So it always suggest something.

How do I pass the state to the UPS account?

TA 05-08-2006 08:29 AM

Quote:

Originally Posted by thundernugs
soooooo, mustang or realsecurity, can either of you share (or sell) the code you used to modify your checkout process? did anyone else modify theirs to a streamlined, workable solution?

i've taken a look at the EasyCheckout Mod but it's just not that smooth, IMHO.

are there any other checkout mods available that i've missed?

thanks,

mike


I share thundernugs questions here. The default checkout process is way too tedious.

Grant 05-23-2006 07:23 AM

Quote:

Originally Posted by RoboDad
I just found this checkout_login mod, and added it to my anonymous_checkout.tpl, and it works great, unless the user enters an incorrect password. When that happens, the user gets redirected to error_message.php, and I haven't been able to find out where this is happening, or how to redirect them back to cart.php.

Any ideas on where to look?


Works just fine on 4.0.18 - no errors

Grant 05-31-2006 04:30 PM

Re: easy simplify checkout mod
 
Quote:

Originally Posted by bobcc99
Hi All,

This was some simple mods I have done for X-Cart 4.11, to make the checkout neater. I post it here in case it is useful to anyone starting out.

In summary, I have changed the title of the first block of registering for profile or checkout to Customer Details, have removed URL, Fax, Company fields and brought the Phone and Email up to this block as well as some other formatting. Also removed the multiple fields for first and last name so there is just the one. Any alternative ways of doing this I'd be interested to here about.

** CHANGE TEXT "PERSONAL INFORMATION (register/checkout)**
In Admin, go to Languages, select English.
Wait for page refresh. Select Labels and type in "Personal Information"
Change this text to 'Customer Details' and click Apply Changes

** REGISTER PAGE - COMBINE CONTACT FIELDS WITH CUSTOMER DETAILS **
In customer/main/register.tpl find this code
{include file="main/register_contact_info.tpl" userinfo=$userinfo}
move to below {include file="main/register_personal_info.tpl" userinfo=$userinfo}
Open main/register_contact_info.tpl and remove the header row <tr> and associated code </tr>

** REGISTER/CHECKOUT PAGES - HIDE BILLING/SHIPPING INFORMATION FIRSTNAME LASTNAME **
Do this if you want to use the firstname lastname fields as identical for
registering, shipping and billing
Open main/register_shipping_address.tpl

Find this code:
----------------------------------------------------------------------------
Code:

{if $default_fields.firstname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_first_name}</TD>
<TD>{if $default_fields.firstname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname}">
{if $reg_error ne "" and $userinfo.s_firstname eq "" && $default_fields.firstname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
 {/if}

{if $default_fields.lastname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_last_name}</TD>
<TD>{if $default_fields.lastname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="s_lastname" size="32" maxlength="32" value="{$userinfo.s_lastname}">
{if $reg_error ne "" and $userinfo.s_lastname eq "" && $default_fields.lastname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

------------------------------------------------------------------------------
REPLACE WITH
Code:

<INPUT type="hidden" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname}">
<INPUT type="hidden" name="s_lastname" size="32" maxlength="32" value="{$userinfo.s_lastname}">

REPEAT FOR BILLING
Open main/register_billing_address.tpl

Find two table rows containing first last name fields as above
and replace with

Code:

<INPUT type="hidden" name="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}">
<INPUT type="hidden" name="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}">


Open main/register_personal_info.tpl
Find INPUT fields for firstname and lastname
ADD THIS CODE to end of tag

Code:

onChange="populateProfile()"

Open common_js.tpl
Add this function

Code:

function populateProfile() {
document.registerform.s_firstname.value = document.registerform.firstname.value;
document.registerform.s_lastname.value = document.registerform.lastname.value;
document.registerform.b_firstname.value = document.registerform.firstname.value;
document.registerform.b_lastname.value = document.registerform.lastname.value
}


To maintain "leave empty if same as billing" message before registering
open main/register_shipping_address.tpl
find
Code:

{if !$is_s_fields}({$lng.lbl_leave_empty_if_same_as_b_address}){/if}

replace with
Code:

{if $login eq ""}({$lng.lbl_leave_empty_if_same_as_b_address}){/if}

** CHECKOUT PAGE 3 **
To simplify information on this page...
customer/main/cart_details -

find
{if $cart.products and $have_products eq "Y"} lines 77 and 99
comment out * these and their respective end tags

customer/main/customer_details.tpl
format/remove unused fields like fax, company name fields etc.

customer/main/checkout_notes.tpl
do some formatting here


bob


This doesn't work on 4.0.18 - just generates 'fields not completed errors'

http://www.wyzeshop.com/screenshot8.gif

:(

Does anybody know how to get rid of that stupid multiple name entry thing?

Multitoolstore 06-01-2006 09:40 AM

Re: easy simplify checkout mod
 
Hi Grant,

Quote:

Originally Posted by bobcc99
Does anybody know how to get rid of that stupid multiple name entry thing?


Check out ajj's post in this thread http://forum.x-cart.com/viewtopic.php?t=20344&postdays=0&postorder=asc&sta rt=15 it is a much easier solution.

Cheers

funkymonkey 07-21-2006 06:35 PM

Thanks bobcc99 for a great mod. Do you know of a way to make the shipping fields self propogate with the billing info once the checkbox has been checked?

I think this would be a nice touch and give the customer a little added reassurance. Thanks.

alru111 07-30-2006 06:14 PM

This is implemented in the last version of xcart. Customer initially sees only billing address and if it's different from shipping JS opens up shipping fields, name is entered only once. Looks very clean and simple for customer.
I tried to copy but there is too many dependencies, if someone wants to give it a try post here the results


All times are GMT -8. The time now is 04:29 PM.

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