Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Company Store With One Shipping Address

Company Store With One Shipping Address

Views: 516

Results 1 to 2 of 2
24 May 2011, 3:10 PM
#1
vandydavid avatar

vandydavid

New Zenner

Join Date:
May 2007
Posts:
24
Plugin Contributions:
0

Company Store With One Shipping Address

Hey guys. I am setting up a company store where all of my customers are in one company...obviously :) We are giving them free shipping and it goes directly to their home office. What I am wanting is set the default the shipping address to their Main Office Location and not let them have a chance to input their shipping address.

I have tried to just turn off the shipping address in the account creation field, but it is not working. I set it all to False in "Customer Details" and minimum Values to 0 but it is still showing.

What I am really wanting is, what I think, a little more elegant. I want the shipping address to be filled in for them already with the home office address when they go and create their account. How can I do this...is this even possible.

Thanks in advance!

David

24 May 2011, 5:09 PM
#2
evelt avatar

evelt

Zen Follower

Join Date:
Nov 2009
Location:
In beautyful New York
Posts:
170
Plugin Contributions:
1

Re: Company Store With One Shipping Address

Off the record!!!

I will tell you how i would do it, this is most probably not a good idea for everybody but it may work for you.

Back up the file you edit!!! Always.

go to "tpl_create_account_default.php" in your template folder

by default it will be
"includes/templates/template_default/templates/tpl_create_account_default.php"

look for this code

  
<?php echo zen_draw_input_field('street_address', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_street_address', '40') . ' id="street-address"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?>

right after 'street_address' you will see an empty ''; put in what ever you would like the default value should be
ex: 'this address';

scroll a bit then do the same
at

<?php echo zen_draw_input_field('suburb', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>

right after 'suburb',

then after it

<?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' . ENTRY_CITY_TEXT . '</span>': ''); ?>

after 'city',

and after 'state', (you must disable the drop down in configuration>customer details)

and set the country to default the country you want

Enjoy and please be careful (I'm not responsible for any mess)

BACKUP BACKUP BACKUP