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)
-   -   3.5.x - Checkout - Neater Customer Details (https://forum.x-cart.com/showthread.php?t=6228)

shan 01-27-2004 01:20 PM

3.5.x - Checkout - Neater Customer Details
 
make a new file called

skin1/customer/main/00_shan_customer_details.tpl

Code:

{* $Id: 00_shan_customer_details.tpl, shan Exp $ *}

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    {$lng.lbl_personal_information}
   

      <hr>
    </td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="2" cellspacing="0">
      <tr>
        <td> Full Name</td>
        <td> : {$userinfo.firstname} {$userinfo.lastname}
                </td>
      </tr>
      <tr>
        <td>{$lng.lbl_phone}</td>
        <td>: {$userinfo.phone}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_fax}</td>
        <td>: {$userinfo.fax}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_email}</td>
        <td>: {$userinfo.email}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_web_site}</td>
        <td>: {$userinfo.url}</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="2" cellspacing="0">
      <tr>
        <td colspan="2">
          {$lng.lbl_billing_address}
       
<HR></td>
        <td></td>
        <td colspan="2">
          {$lng.lbl_shipping_address}
       
<HR></td>
      </tr>
      <tr>
        <td>{$lng.lbl_first_name}
        </td>
        <td> :
            {$userinfo.b_firstname}
        </td>
        <td></td>
        <td>{$lng.lbl_first_name}
        </td>
        <td>:
            {$userinfo.s_firstname}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_last_name}
        </td>
        <td> :
            {$userinfo.b_lastname}
        </td>
        <td></td>
        <td>{$lng.lbl_last_name}
        </td>
        <td>:
            {$userinfo.s_lastname}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_address}
        </td>
        <td> :
            {$userinfo.b_address}
        </td>
        <td></td>
        <td>{$lng.lbl_address}
        </td>
        <td>:
            {$userinfo.s_address}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_city}
        </td>
        <td> :
            {$userinfo.b_city}
        </td>
        <td></td>
        <td>{$lng.lbl_city}
        </td>
        <td>:
            {$userinfo.s_city}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_state}
        </td>
        <td> :
            {$userinfo.b_statename}
        </td>
        <td></td>
        <td>{$lng.lbl_state}
        </td>
        <td>:
            {$userinfo.s_statename}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_country}
        </td>
        <td> :
            {$userinfo.b_countryname}
        </td>
        <td></td>
        <td>{$lng.lbl_country}
        </td>
        <td>:
            {$userinfo.s_countryname}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_zip_code}
        </td>
        <td> :
            {$userinfo.b_zipcode}
        </td>
        <td></td>
        <td>{$lng.lbl_zip_code}
        </td>
        <td>:
            {$userinfo.s_zipcode}
        </td>
      </tr>
    </table></td>
  </tr>
</table>
<hr>




open up skin1/customer/main/checkout.tpl and find

Code:

<pre>
<font>
{include file="customer/main/customer_details.tpl"}
</font>
</pre>


replace with

Code:

{include file="customer/main/00_shan_customer_details.tpl"}

this just formats the personal info at the checkout a bit better

curpier 01-27-2004 03:59 PM

Nice mod Shan. Thanks!

I decided to give it a try in 3.4.9. Seems to work fine, in fact it makes the checkout page look much "cleaner." Just a question though: At the checkout page under the shipping & billing address the first name and last name fields come through empty? Is there anyway to fix this?

-Adam
www.curpiermotorsport.com
Xcart 3.4.9

shan 01-27-2004 04:01 PM

thats because ship to first and last name were only added as of 3.5.x

you can just replace them with the ones from billing address or comment them out using {* comment tags *}

curpier 01-27-2004 04:09 PM

Thanks for the quick reply! I'll just comment them out.

adpboss 05-15-2004 11:52 AM

Note:

Smarty 2.6.2 doesn't like this for some reason.

GM 05-15-2004 11:24 PM

Do you think it's Shan it doesn't like? Or the Code? :lol: (kidding)
What's it doin'?

adpboss 05-16-2004 03:35 AM

Darn. Didn't save the debug or error info.

It was a line error in either Smarty.php or Smartyclass.php.

Anyway, it's a live store running 3.4.14 and I have a project I'm developing on 3.5.7. I should probably concentrate on screwing up the dev store and not the one that pays the rent. ;)

GM 05-16-2004 08:29 PM

Yep... good plan, don't break the money maker :wink:

shan 05-17-2004 06:15 AM

Quote:

Originally Posted by adpboss
Darn. Didn't save the debug or error info.

It was a line error in either Smarty.php or Smartyclass.php.

Anyway, it's a live store running 3.4.14 and I have a project I'm developing on 3.5.7. I should probably concentrate on screwing up the dev store and not the one that pays the rent. ;)


Theres not much in there that could go wrong really. It may be because it calls a few variables in 3.5.x that are not in 3.4.x. The ship to stuff that was muentioned earlir.

adpboss 10-31-2004 05:25 PM

For 4.0.5.

Please note I did not figure out how to add the additional fields for the billing and shipping addresses without having to redo much of the table. If you are not using the additional fields, you should be fine. I am not using those fields.

Code:

{* $Id: 00_shan_customer_details.tpl, shan Exp $ *}

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
    {$lng.lbl_personal_information}
   

      <hr>
    </td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="2" cellspacing="0">
      <tr>
        <td> Full Name</td>
        <td> : {$userinfo.firstname} {$userinfo.lastname}
                </td>
      </tr>
      <tr>
        <td>{$lng.lbl_phone}</td>
        <td>: {$userinfo.phone}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_fax}</td>
        <td>: {$userinfo.fax}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_email}</td>
        <td>: {$userinfo.email}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_web_site}</td>
        <td>: {$userinfo.url}</td>
                {foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'C' || $v.section eq 'P'}
                  <td>{$v.title}</td>
                <td>: {$v.value}</td>
{/if}{/foreach}
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="2" cellspacing="0">
      <tr>
        <td colspan="2">
          {$lng.lbl_billing_address}
       
<HR></td>
        <td></td>
        <td colspan="2">
          {$lng.lbl_shipping_address}
       
<HR></td>
      </tr>
      <tr>
        <td>{$lng.lbl_first_name}
        </td>
        <td> :
            {$userinfo.b_firstname}
        </td>
        <td></td>
        <td>{$lng.lbl_first_name}
        </td>
        <td>:
            {$userinfo.s_firstname}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_last_name}
        </td>
        <td> :
            {$userinfo.b_lastname}
        </td>
        <td></td>
        <td>{$lng.lbl_last_name}
        </td>
        <td>:
            {$userinfo.s_lastname}
        </td>
      </tr>
      <tr>
        <td></td>
        <td>{if $userinfo.b_address_2}
                {$userinfo.b_address_2}
{/if}</td>
        <td></td>
        <td></td>
        <td>{if $userinfo.s_address_2}
                {$userinfo.s_address_2}
{/if}</td>
      </tr>
      <tr>
        <td>{$lng.lbl_address}
        </td>
        <td> :
            {$userinfo.b_address}
        </td>
        <td></td>
        <td>{$lng.lbl_address}
        </td>
        <td>:
            {$userinfo.s_address}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_city}
        </td>
        <td> :
            {$userinfo.b_city}
        </td>
        <td></td>
        <td>{$lng.lbl_city}
        </td>
        <td>:
            {$userinfo.s_city}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_state}
        </td>
        <td> :
            {$userinfo.b_statename}
        </td>
        <td></td>
        <td>{$lng.lbl_state}
        </td>
        <td>:
            {$userinfo.s_statename}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_country}
        </td>
        <td> :
            {$userinfo.b_countryname}
        </td>
        <td></td>
        <td>{$lng.lbl_country}
        </td>
        <td>:
            {$userinfo.s_countryname}
        </td>
      </tr>
      <tr>
        <td>{$lng.lbl_zip_code}
        </td>
        <td> :
            {$userinfo.b_zipcode}
        </td>
        <td></td>
        <td>{$lng.lbl_zip_code}
        </td>
        <td>:
            {$userinfo.s_zipcode}
        </td>
      </tr>
    </table></td>
  </tr>
</table>
<hr>



All times are GMT -8. The time now is 04:56 AM.

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