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

register form in checkout mode - summary

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 02-24-2006, 09:01 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

Just noticing that you are using v 11, although the mod was put together for 13, it should still work. Are you planning on upgrading to 17 at all? 11 was full of bugs and 17 has improved this feature anyway, you don't need to fill it in - just leave it blank.

If you are going to do this, then you would save time trying to solve this.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #12  
Old 02-24-2006, 09:09 AM
 
Phlash Phlash is offline
 

Newbie
  
Join Date: Feb 2005
Location: Ridge Manor, FL
Posts: 5
 

Default

I am using 17...
Sorry.
I thought I changed it in my profile before posting this question.
I guess it didn't stick.

I know you can leave the ship-to blank - but though this 'check box' mod would make it look better....
__________________
4.0.17 gold
Reply With Quote
  #13  
Old 02-24-2006, 09:19 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

It's kind of redundant in 17, you don't want people to have more clicks - less is best, gets them to the end quicker and then you get paid! No point adding things just to make it look cool - you have to think of the overall goal.

It's up to you though, if you want to try and solve it we can.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #14  
Old 03-05-2006, 06:46 AM
 
Phlash Phlash is offline
 

Newbie
  
Join Date: Feb 2005
Location: Ridge Manor, FL
Posts: 5
 

Default

OK.. you've talked me out of it... I did use part of the mod to copy the name down though.

I'd still like to figure out how to have it ask for the county AFTER the state in the checkout though...
It looks kinda funny asking for it before....

Anyone done this yet?

Thanks
__________________
4.0.17 gold
Reply With Quote
  #15  
Old 04-06-2006, 11:51 AM
 
ccakins ccakins is offline
 

Member
  
Join Date: May 2005
Location: Tampa, FL, US
Posts: 27
 

Default

I was able to switch around the State and County order, but am still working on how to get the county field to show only when there are counties configured for that state.

So here's what you have to do. Go into /main/register_billing_address.tpl and find this code:
Code:
{if $default_fields.b_county.avail eq 'Y' and $config.General.use_counties eq "Y"} <TR> <TD align="right">{$lng.lbl_county}</TD> <TD>{if $default_fields.b_county.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> {include file="main/counties.tpl" counties=$counties name="b_county" default=$userinfo.b_county country_name="b_country"} {if ($reg_error ne "" and $userinfo.b_county eq "" and $default_fields.b_county.required eq 'Y') or $error eq "b_county"}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}

Move it so it's underneath the state block of code:
Code:
{if $default_fields.b_state.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_state}</TD> <TD>{if $default_fields.b_state.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> {include file="main/states.tpl" states=$states name="b_state" default=$userinfo.b_state default_country=$userinfo.b_country country_name="b_country"} {if $error eq "b_statecode" and $default_fields.b_state.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}

Do the same thing for /main/register_shipping_address.tpl.
__________________
Dictationstore.com - Professional Dictation and Transcription Products
Jessica Clifford
Tech Support & Development
V 4.0.18
Reply With Quote
  #16  
Old 04-07-2006, 06:14 AM
 
Phlash Phlash is offline
 

Newbie
  
Join Date: Feb 2005
Location: Ridge Manor, FL
Posts: 5
 

Default

Thanks, but that didn't work for me....
Is there anywhere else that we need to change the County/State order, to make this work?

My site looks rather confusing to the customer on the checkout page.
I WISH I could fix it...

Any other ideas?
BTW, your plan on making the County field only show up for states with county assigned sounds REAL good!
Let me know if you get that working...

Thanks
Gordon
__________________
4.0.17 gold
Reply With Quote
  #17  
Old 04-07-2006, 08:46 AM
 
ccakins ccakins is offline
 

Member
  
Join Date: May 2005
Location: Tampa, FL, US
Posts: 27
 

Default

I'm trying to remember what exactly I did to make that change. I believe that was it. Make sure you're moving the code to the correct spot because there's 2 "blocks" of code for the state. You should be moving the county code under this line:

Code:
{if ($reg_error ne "" and $userinfo.s_state eq "" and $default_fields.s_state.required eq 'Y') or $error eq "s_statecode"}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}

Ah, just found this one. Check out /main/register_states.tpl.
__________________
Dictationstore.com - Professional Dictation and Transcription Products
Jessica Clifford
Tech Support & Development
V 4.0.18
Reply With Quote
  #18  
Old 04-09-2006, 06:57 PM
 
ajj ajj is offline
 

Newbie
  
Join Date: Jan 2003
Posts: 7
 

Default Re: register form in checkout mode - summary

Quote:
Originally Posted by pauldodman
There are a lot of threads regarding entering names 3 times in the checkout register form. The main one has over 3500 views and 6 pages of discussion. If like me you find this confusing and you need a fix for standard 4.0.13 that covers most requirements, then hopefully this will help. (If you are an administrator and I have started a new topic when I shouldn't, sorry, just trying to make a complicated problem to solve via the forum simpler.)

The main thread (http://forum.x-cart.com/viewtopic.php?t=17146&highlight=profile) branches off to solve the problem for version 3, then for Jon's EzCheckout, making it hard to follow and implement a standard fix.

This post:
  • Saves your customer typing in names more than once in the checkout register form.
    still allows them to enter different names if they want to for Billing and Shipping
    Designed for standard 4.0.13
    Makes changes to the register form in checkout.
    Accounts for fact there are 2 register forms, therefore preserves normal register/create profile form


When customer starts the form, enters First and last name; these are duplicated to Billing Address (but not to Shipping)
Fills in the rest of Billing Address. Click the check box to duplicate name and address to Shipping.
Includes County/State and Country.

Doesn't matter if fields are mandatory, as they will get filled in one way or the other, but doesn't remove them as they may well be needed......


Hi,
i think the way you solve this problem is a bit complicate.
Why not just do this.
1. open include/register.php

find

Code:
if ($action == 'cart') { if (empty($s_firstname) && $default_fields['firstname']['avail'] == 'Y') { $HTTP_POST_VARS["s_firstname"] = $s_firstname = $firstname; } if (empty($s_lastname) && $default_fields['lastname']['avail'] == 'Y') { $HTTP_POST_VARS["s_lastname"] = $s_lastname = $lastname; }
after just add
Code:
if (empty($b_firstname) && $default_fields['firstname']['avail'] == 'Y') { $HTTP_POST_VARS["b_firstname"] = $b_firstname = $firstname; } if (empty($b_lastname) && $default_fields['lastname']['avail'] == 'Y') { $HTTP_POST_VARS["b_lastname"] = $b_lastname = $lastname; } if (empty($b_title) && $default_fields['title']['avail'] == 'Y') { $HTTP_POST_VARS["b_title"] = $b_title = $title; }

2. open skin1/main/register_billing_address.tpl

find
Code:
{if $default_fields.title.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_title}</TD> <TD>{if $default_fields.title.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <SELECT name="b_title"> {section name=title loop=$name_titles} <OPTION {if $userinfo.b_title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</OPTION> {/section} </SELECT> </TD> </TR> {/if} {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="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}"> {if $reg_error ne "" and $userinfo.b_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="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}"> {if $reg_error ne "" and $userinfo.b_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="b_title" value="{$name_titles[title]}"> <INPUT type="hidden" name="b_firstname" value="{$userinfo.b_firstname}"> <INPUT type="hidden" name="b_lastname" value="{$userinfo.b_lastname}">

done...
__________________
Version 4.0.18
The fool wonders, the wise man asks.
Reply With Quote
  #19  
Old 06-03-2006, 11:55 AM
 
TA TA is offline
 

eXpert
  
Join Date: Apr 2006
Posts: 303
 

Default

Thanks for sharing this code ajj!

Has anybody tried this and are there any other issues?
__________________
v4.7.12
v5.4.x (In Dev)
Reply With Quote
  #20  
Old 06-28-2006, 07:16 AM
 
summit summit is offline
 

Newbie
  
Join Date: May 2006
Posts: 8
 

Default

the code works up to the point where you hit the "Submit" button, at which point it give me errors about required fields....

any fix for this?
__________________
Scott E.
Summit Sports Inc.

Using X-Cart v.4.0.18
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 05:38 PM.

   

 
X-Cart forums © 2001-2020