Jump to content
Sign in to follow this  
hobbzilla

Address Book Enhancer

Recommended Posts

Hi All!

The contribution [v1.1 - 06/06/2005] installed perfectly and all went very smooth.

Thank you!!

 

Just one problem though...

When my customers press the EDIT buttons next to thier addresses in the address book they recieve the message: "The address book entry does not exist."

How come?

 

If I understand this right, the actual error message comes from "catalog/address_book_process.php"

Here's the line in the contrib install package:

  if (isset($HTTP_GET_VARS['edit']) && is_numeric($HTTP_GET_VARS['edit'])) {
//rmh addr-enhancer edited next line
$entry_query = tep_db_query("select entry_id_name, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_street_address2, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id, entry_telephone, entry_fax from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$HTTP_GET_VARS['edit'] . "'");

if (!tep_db_num_rows($entry_query)) {
  $messageStack->add_session('addressbook', ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY);

...and here's mine:

// BOF Separate Pricing Per Customer 
 if (isset($HTTP_GET_VARS['edit']) && is_numeric($HTTP_GET_VARS['edit'])) {
//rmh addr-enhancer edited next line  
$entry_query = tep_db_query("select entry_id_name, entry_gender, entry_company, entry_tva_intracom, entry_company_tax_id, entry_firstname, entry_lastname, entry_street_address, entry_street_address2, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id, entry_telephone, entry_fax from  " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$HTTP_GET_VARS['edit'] . "'");
// EOF Separate Pricing Per Customer
if (!tep_db_num_rows($entry_query)) {
  $messageStack->add_session('addressbook', ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY);

...as you can see I have SPPC and the E.U VAT Intracom contribs installed, but that should not be a problem, should it?

Here's an example link from an EDIT-button: "http://www.whatever.com/address_book_process.php/edit/96

Deleting an address works just as usual....

Any ideas anyone?

//Micke

 

 

 

Micke,

 

If you have phpmyadmin or know how to use the MySQL command-line can you perform the above select statement for the user-id in question and report back the results? (you will need to replace '###' with the user_id of the customer).

 

select entry_id_name, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_street_address2, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id, entry_telephone, entry_fax from address_book where customers_id = '###' and address_book_id = '96'

 

Could you also do

 

select * on address_book whereaddress_book_id = '96'

 

Other than the additional fields in the sql select statement, my contribution would have nothing to do with the error you are getting back. Looks like either your mysql data is incorrect or you have another contrib that has adjusted a sql statement somewhere to no longer give you a result set.

Share this post


Link to post
Share on other sites

Hi Hobbz!

 

I just downloaded the contrib again, unzipped a fresh address_book_process.php and did a compare...

There was a chunk of code (about a dozen lines) missing after the statement that I attached to the prior post.

It turns out it was a simple cut-and-paste mistake!

Now it works like a charm.

Thanks!

 

//Micke

Share this post


Link to post
Share on other sites

Hi Hobbz,

I installed your address book enhancer and after I enter the credit card number and click continue I am sent back to the delivery information page.

Any ideas?

Ron Foreman

Edited by 241

Ron Foreman

EmpowerYou

(647) 999-8543

Skype: RonForeman

Share this post


Link to post
Share on other sites

Ron: Do you have any other contribs installed? Was it doing this before the address_book integration? Do you have "force cookies" enabled on the site and are using a different SSL domain by chance?

 

Doesn't sound like anything this contrib would do (but weirder things have happened!) -- I will try and duplicate and await your responses.

Share this post


Link to post
Share on other sites

Would like to thank you for a nice contribution, but there's one bug in the 1.3 version (at least on my website).

 

On the webpage: checkout_shipping.php

The "Continue" button is no longer clickable, therefore customers can't move on with their orders

I've compared the code with the original code, and I cannot find any difference or places to change it.

 

Other than that, it seems to work well. (Of course I havent tested further than the checkout_shipping.php, but still)

Share this post


Link to post
Share on other sites

Hi Ryan,

 

I have a heavily modified store (SPPC). Consequently, I need to merge your modifications into the respective files (assuming that the sql will work with the modified database).

 

On examination I find that your patches are not so easy to pick as you have not indicated which is the beginning and which is the end with your 'addr-enhancer'.

 

Would it be possible to publish the patches (so that pasting into the files becomes easier)?

 

Regards,

Peter

 

P.S. I am not a php programmer.

Peter

Share this post


Link to post
Share on other sites

I have already emailed the author before I found this forum. I apologize for that.

 

My understanding of this contribution is that it adds (among other things) another telephone number field in the address book entries.

Everything seems to work fine and the shop has no problems, but I don't see any place where I Can actually see the recipient's phone number.

 

I looked in the invoice, the packing slip and the email to the store owner and there is no trace of the telephone number.

 

The author states:

There is an additional address line as well as a telephone & fax for each address book entry. Useful when selecting 2nd day air or overnight shipping options and the carrier requires a phone number for the delivery address.

I agree, it'd be wonderful, but as an admin I am not able to see either anywhere.

Am I going blind or have I made a mistake? I installed the contribution using winmerge, so I am fairly positive I did everything right.

 

I would really appreciate an answer to this, if it is supposed to show the number anywhere, than I have to see where I went wrong, other wise I have to find a way to collect and display the recipient telephone number somehow, but my PHP skills are lacking when dealing with OSC and it's structure.

 

 

Thank you very much for the help.

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  

×