Jump to content
Sign in to follow this  
Soundman01

Collect Residential / Commercial info for shipping

Recommended Posts

Support for:

Collect Residential / Commercial info for shipping

 

I have started the post as a forum for any one having trouble.

 

Hope no one needs it :P

 

Enjoy

Brandon

Share this post


Link to post
Share on other sites

This will prob be a stupid question - I downloaded this but am not clear about the sql part of the install - - can you explain for me a bit

 

This is just what I need - thanks for it; hope to get it installed, despite myself LOL

 

TIA

Share this post


Link to post
Share on other sites

I have added a few statements in phpmyadmin, yes - but, I am a novice and the ones I added were separate files so what I am not sure of is how to add this:

 

SQL?Add to database

<<<<<<<

alter table orders add column delivery_residence_id varchar (11) not null;

alter table address_book add column entry_residence_id varchar (11) not null;

 

 

Replace address_format (address_format_id, address_format, address_summary) VALUES (1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country$cr$residence', '$city / $country');

Replace address_format (address_format_id, address_format, address_summary) VALUES (2, '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country$cr$residence', '$city, $state / $country');

Replace address_format (address_format_id, address_format, address_summary) VALUES (3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country$cr$residence', '$state / $country');

Replace address_format (address_format_id, address_format, address_summary) VALUES (4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country$cr$residence', '$postcode / $country');

Replace address_format (address_format_id, address_format, address_summary) VALUES (5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country$cr$residence', '$city / $country');

<<<<<<<<

 

 

where to start;

where to end;

and can I just save it as a file and add it,

or . . .

 

And as far as the other changes on the install file, my understanding is that I would just replace the existing files with the ones provided, correct? Backing up the ones that will be overwritten, of course.

 

Thanks for being willing to advise me on this, much appreciated!

Share this post


Link to post
Share on other sites

You can create a file to add to MYSQL, or you should be able to find under "execute sql" in Admin MYSQL a large text box that you can copy the whole thing into to enter it.

 

I would recommend if you just back up all the related files and then copy the new ones in replacing the old. Then check your site and verify install, and see if there are any changes that you made that are missing. If so you will need to manually change the culprit file.

 

I'm glad to hear that this has helped someone else.

 

Enjoy

Brandon

Share this post


Link to post
Share on other sites

I am very pleased to advise that this install went very well in my test install of OSC and then in my development site - - I replaced all the files provided with the exception of the english.php file which I modified manually as the existing one is tweaked; database entry smooth so all is working just fine after testing -

 

only one thing I'd like to mention is that in Admin, Customers - clicking on a customer that I created AFTER the install of the contrib, there is no mention if he is Residential or Commercial - but if I go into ORDERS, I can see that the shipping address is either residential or commercial.

 

Thank you very much - this will be very helpful - great job!

Share this post


Link to post
Share on other sites
I am very pleased to advise that this install went very well in my test install of OSC and then in my development site - - I replaced all the files provided with the exception of the english.php file which I modified manually as the existing one is tweaked; database entry smooth so all is working just fine after testing -

 

only one thing I'd like to mention is that in Admin, Customers - clicking on a customer that I created AFTER the install of the contrib, there is no mention if he is Residential or Commercial - but if I go into ORDERS, I can see that the shipping address is either residential or commercial. 

 

Thank you very much - this will be very helpful - great job!

 

I'm glad to hear that you like it.

The Admin customer?s pages, I opted to not modify that page. I made the assumption based on my use of OScommerce that you rarely need to directly view or edit the customer?s info like that. If this is a big problem for you let me know and I'll see what I can do.

 

Brandon

Share this post


Link to post
Share on other sites
I'm glad to hear that you like it.

The Admin customer?s pages, I opted to not modify that page. I made the assumption based on my use of OScommerce that you rarely need to directly view or edit the customer?s info like that. If this is a big problem for you let me know and I'll see what I can do.

 

Brandon

 

Thanks Brandon but it's not a problem at all - and I think your reasoning is sound. I'm very pleased with this contrib - we've been getting hit for additional UPS charges after shipping has been completed, and even though it's not the end of the world, it will be nice to have the charge done right and not out of pocket.

 

What else you got going? LOL - give a pig a finger and he wants the whole hand LOL

 

Thanks again for this sweet contrib

Ron

Share this post


Link to post
Share on other sites

I installed this contrib and it seems to be working but I would like it to display the Residential or commercial under the address under the customers address in their order after they have placed an order. Also when you go into address book on customer it doesn't display whether its residential or commercial under the address. It does however display fine when in the process of displaying it at order confirmation and when receive the order confirmation email. Any help on getting this to display on orders at least would be greatly appreciated.

 

 

- Andy

Share this post


Link to post
Share on other sites
I installed this contrib and it seems to be working but I would like it to display the Residential or commercial under the address under the customers address in their order after they have placed an order. Also when you go into address book on customer it doesn't display whether its residential or commercial under the address. It does however display fine when in the process of displaying it at order confirmation and when receive the order confirmation email. Any help on getting this to display on orders at least would be greatly appreciated.

- Andy

 

If you have it setup correctly it will display Residential or Commercial under the "Shipping address" (only) in the view orders page in the admin section. I did not design it design it to display under the customer edit address, I sort of figured it wasn't useful. Check your shipping address, and if it is not there check your install. If you have further problems let me know.

Enjoy

Brandon

Share this post


Link to post
Share on other sites
If you have it setup correctly it will display Residential or Commercial under the "Shipping address" (only) in the view orders page in the admin section. I did not design it design it to display under the customer edit address, I sort of figured it wasn't useful. Check your shipping address, and if it is not there check your install. If you have further problems let me know.

Enjoy

Brandon

 

 

Brandon,

 

I have checked and rechecked my installation of this contrib and it still isn't displaying residence or commercial under shipping address on an order in admin. What do i need to get to you/and how email or pm on here to maybe see whats going on here to fix this. please let me know.

Share this post


Link to post
Share on other sites
Brandon,

 

I have checked and rechecked my installation of this contrib and it still isn't displaying residence or commercial under shipping address on an order in admin. What do i need to get to you/and how email or pm on here to maybe see whats going on here to fix this. please let me know.

 

Double check and triple check the additions to:

Catalog/admin/includes/classes/order.php

Catalog/admin/includes/functions/general.php

 

Then also check your database server under table "orders" "delivery_residence_id" make sure it is there (you correctly added it) and verify that there is "Residential" or "Commercial" in it for the appropriate orders.

 

if you don't have "delivery_residence_id" in your DB than that may be the problem, if it is there and blank then it is a problem with the order recording it properly, if this all looks correct we are back to the admin mods.

(not to cryptic I hope)

good luck

Brandon

Share this post


Link to post
Share on other sites
Double check and triple check the additions to:

Catalog/admin/includes/classes/order.php

Catalog/admin/includes/functions/general.php

 

Then also check your database server under table "orders" "delivery_residence_id" make sure it is there (you correctly added it) and verify that there is "Residential" or "Commercial" in it for the appropriate orders.

 

if you don't have "delivery_residence_id" in your DB than that may be the problem, if it is there and blank then it is a problem with the order recording it properly, if this all looks correct we are back to the admin mods.

(not to cryptic I hope)

good luck

Brandon

 

 

Brandon,

Lastnight I looked at my DB before replying here. delivery_residence_id in my db was not between delivery_country delivery_address_format_id columns . delivery_residence_id in the db was at very last or the very last column to the right of currency_value . I noticed in the install in structions that delivery_country delivery_residence_id, and delivery_address_format_id were all in order next to each other and therefore figured it should be the same in the db so I removed the delivery_residence_id (or droped through my phpmyadmin) column so after droping delivery_residence_id column I ran the sql query

 

alter table orders add column delivery_residence_id varchar (11) not null after delivery_country;

 

instead of the alter table orders add column delivery_residence_id varchar (11) not null; (which had put it at the very last column in the orders table.)

 

I figured changing this would help fix it, but it still isn't recording it in the orders in admin but it does send in the order confirmation email that it is residence or commercial and is recording to entry_residence_id under address_book table. the delivery_residence_id column in the orders table is completely blank .

 

Here is my code for admin/includes/classes/order.php :

 

$this->delivery = array('name' => $order['delivery_name'],

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => $order['delivery_country'],

'residence_id' => $order['delivery_residence_id'],

'format_id' => $order['delivery_address_format_id']);

 

Here is my code for /admin/includes/functions/general.php from likne 356 - 361:

 

$street = tep_output_string_protected($address['street_address']);

$suburb = tep_output_string_protected($address['suburb']);

$city = tep_output_string_protected($address['city']);

$state = tep_output_string_protected($address['state']);

$residence = tep_output_string_protected($address['residence_id']);

if (isset($address['country_id']) && tep_not_null($address['country_id'])) {

 

 

 

So all my code looks like to me (which i could be wrong) looks like i followed what should be added to orders.

Share this post


Link to post
Share on other sites
Brandon,

Lastnight I looked at my DB before replying here. delivery_residence_id in my db was not between delivery_country delivery_address_format_id columns . delivery_residence_id in the db was at very last or the very last column to the right of currency_value . I noticed in the install in structions that delivery_country delivery_residence_id, and delivery_address_format_id were all in order next to each other and therefore figured it should be the same in the db so I removed the delivery_residence_id (or droped through my phpmyadmin) column so after droping delivery_residence_id column I ran the sql query

 

alter table orders add column delivery_residence_id varchar (11) not null after delivery_country;

 

instead of the alter table orders add column delivery_residence_id varchar (11) not null; (which had put it at the very last column in the orders table.)

 

I figured changing this would help fix it, but it still isn't recording it in the orders in admin but it does send in the order confirmation email that it is residence or commercial and is recording to entry_residence_id under address_book table. the delivery_residence_id column in the orders table is completely blank .

 

Here is my code for admin/includes/classes/order.php :

 

$this->delivery = array('name' => $order['delivery_name'],

'company' => $order['delivery_company'],

'street_address' => $order['delivery_street_address'],

'suburb' => $order['delivery_suburb'],

'city' => $order['delivery_city'],

'postcode' => $order['delivery_postcode'],

'state' => $order['delivery_state'],

'country' => $order['delivery_country'],

'residence_id' => $order['delivery_residence_id'],

'format_id' => $order['delivery_address_format_id']);

 

Here is my code for /admin/includes/functions/general.php from likne 356 - 361:

 

$street = tep_output_string_protected($address['street_address']);

$suburb = tep_output_string_protected($address['suburb']);

$city = tep_output_string_protected($address['city']);

$state = tep_output_string_protected($address['state']);

$residence = tep_output_string_protected($address['residence_id']);

if (isset($address['country_id']) && tep_not_null($address['country_id'])) {

So all my code looks like to me (which i could be wrong) looks like i followed what should be added to orders.

 

I got it fixed. I noticed the problem was two things. 1. In catalog/checkout_process.php I had the order wrong.

 

Originally I had in red which is wrong order compared to the instructions:

 

'street_address'],

'delivery_suburb' => $order->delivery['suburb'],

'delivery_city' => $order->delivery['city'],

'delivery_postcode' => $order->delivery['postcode'],

'delivery_residence_id' => $order->delivery['residence_id'],

'delivery_state' => $order->delivery['state'],

'delivery_country' => $order->delivery['country']['title'],

 

'delivery_address_format_id' => $order->delivery['format_id'],

'billing_name' => $order->billing['firstname'] . ' ' . $order->

 

 

And after looking at the instructions again I noticed that it should of been in the order of the way it is should to be in the db like this in blue as in my db deliver_country column and delivery_residence_id are columns next to each other which makes sense:

 

 

'street_address'],

'delivery_suburb' => $order->delivery['suburb'],

'delivery_city' => $order->delivery['city'],

'delivery_postcode' => $order->delivery['postcode'],

'delivery_state' => $order->delivery['state'],

'delivery_country' => $order->delivery['country']['title'],

'delivery_residence_id' => $order->delivery['residence_id'],

'delivery_address_format_id' => $order->delivery['format_id'],

'billing_name' => $order->billing['firstname'] . ' ' . $order->

 

So after placing delivery_residence_id above delivery_address_format_id in the code above I was able to see residential or commercial in the orders in admin cp. But, Like i said before I noticed t his I noticed in the db deliver_residence_id was the very last column in the orders table and it should of been a column to the right of delivery_country and i had to drop the delivery_residence_id column and re-run the sql query from the instructions and add the word after between not null and delivery_country into the sql query as shown below.

 

alter table orders add column delivery_residence_id varchar (11) not null after delivery_country;

 

Thank you very much for all of your help. Much Much appreciated and thank you for your time. So glad I got this working. Have a good one.

 

Andy :lol: :D :thumbsup:

Share this post


Link to post
Share on other sites

I have installed this module for a client, a very picky pesky client.. She wants -- if commecial is checked then to have a company name field show. I have already checked to TRUE to display the Company Name field in the Customer Details screen in the confirguration section of the control panel... but this is not what she wants..

 

 

o Residential o Commercial

 

When Commercial is chosen THEN the company name field should miraclously appear to be filled in.

 

 

Can this be done????

 

thanks


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites
I have installed this module for a client, a very picky pesky client.. She wants -- if commecial is checked then to have a company name field show. I have already checked to TRUE to display the Company Name field in the Customer Details screen in the confirguration section of the control panel... but this is not what she wants..

o Residential o Commercial

 

When Commercial is chosen THEN the company name field should miraclously appear to be filled in.

Can this be done????

 

thanks

Perhaps she has different buyers than I, but probably about half of my buyers have a business name shipping to a residential address. With the change that she suggests they could not enter there business name unless they give you the false mailing type. I (as the writer of this contribution) am sure that such a change probably could be made, but I have to confess that I am just a novice at PHP coding and I don?t think that I know how. I am guessing it would require some sort of java script or page reload on selection to make it work, which would annoy me. I hate when pages do things I don?t expect them to.

 

Sorry I can?t be more help, other than perhaps giving you more defenses. Good luck

Brandon

Share this post


Link to post
Share on other sites
Perhaps she has different buyers than I, but probably about half of my buyers have a business name shipping to a residential address. With the change that she suggests they could not enter there business name unless they give you the false mailing type. I (as the writer of this contribution) am sure that such a change probably could be made, but I have to confess that I am just a novice at PHP coding and I don?t think that I know how. I am guessing it would require some sort of java script or page reload on selection to make it work, which would annoy me. I hate when pages do things I don?t expect them to.

 

Sorry I can?t be more help, other than perhaps giving you more defenses. Good luck

Brandon

 

 

Thanks Brandon.. actually I had a thought last night that I have not had time to act on.. maybe if commercial was selected it could check that the company name was indeed filled in using java.. being a self taught myself, I can read and alter others code genius butcan not write it myself.. I do have someone I am going to ask to help me with this one and will let you know how I make out


Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Share this post


Link to post
Share on other sites

Soundman01.

I have tripple checked my install and changed my db as iweblogix did and I do not see the info showing on the ship confimation, email or in the admin orders area. I did see that the database is collecting the info as it should in orders > delivery_residence_id and address_book > entry_residence_id.

I just can't figure out where I went wrong. can you help?

Share this post


Link to post
Share on other sites
Soundman01.

I have tripple checked my install and changed my db as iweblogix did and I do not see the info showing on the ship confimation, email or in the admin orders area. I did see that the database is collecting the info as it should in orders > delivery_residence_id and address_book > entry_residence_id.

I just can't figure out where I went wrong. can you help?

 

My first thought goes to table ?address_format? - ?address_format? make sure that they include ?$residence?. I hate to give you a short nothing answer, but with the info you gave it?s the only logical thing. Let me know how that checks out and we?ll go from there.

 

Brandon

Share this post


Link to post
Share on other sites

Thank you, Thank You, THANK YOU. I figured it out. You pointed me in the correct area. Heres the thing:

Along the line I added a contribution or maybe it was from a post where I added antoher (6TH) 'address format' tabel to show the proper formating for USPS. Long story short I had to add the $cr$residence to the end of my 6th format and everything works great. I wish I knew what the contribution was named so everyone else could watch for it but at least if they come here they will know where to start. Thank you for the great contribution. It should help a lot of people. And thank you for the reply.

Share this post


Link to post
Share on other sites

QUESTION: How to set default selection to Residential and keep settings when updating an address.

 

USING: Collect Residential / Commercial info for shipping with Fedex Real Time Quotes

 

We've noticed in IE and Firefox browsers (possibly others), that if a customer logs into their "View or change entries in my address book" account and selects "Update Address Book Entry" the Residential/Commercial contribution will default to Commercial. This also changes their entry from Residential to Commercial on its own and will be updated by the customer accidentally if it is not changes back to Residential.

 

Is there a solution to this by setting up a default radio button selection? Ideally, the choice of Residential or Commercial would stay the same as the customer had setup when they go to update the address. :huh:

Share this post


Link to post
Share on other sites

I need a little help with this contribution please.

 

I've installed the 'Collect Residential / Commercial info for shipping' contribution and it's working fine. The problem is the field is not truly required. All of the other fields marked as required force the user to enter something. A pop-up box appears informing the user of the missing information when the those fields are empty and the user clicks the Submit button...except the Residential / Commercial option. If they do not select anything it still allows the user to continue.

 

Can you tell me how to force the user to select the Residential / Commercial option?

 

FYI - it looks like the code is there to force it but it doesn't work.

 

Thanks!

Joe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×