Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2010
    Location
    Michigan
    Posts
    14
    Plugin Contributions
    0

    Default Customer Can't Delete Addresses in Address Book

    I just found this problem with my site and I have no idea when it started. When the customer clicks "Delete" to remove an address, the question "Are you sure you would like to delete the selected address from your address book?" shows up. The customer then clicks on delete again and the same question shows up and the address isn't deleted. Attached is an image fo the screen that keeps showing up over and over.

    I'm running v1.5
    www.healthydentalproducts.com

    Name:  Address_Book.jpg
Views: 551
Size:  8.9 KB

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customer Can't Delete Addresses in Address Book

    What happens if you switch to the Classic Template ... does it work?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Aug 2010
    Location
    Michigan
    Posts
    14
    Plugin Contributions
    0

    Default Re: Customer Can't Delete Addresses in Address Book

    I just tried it in the classic template and it works properly there. Do you know what specific files deal with deleting addresses? I guess my template has some glitches

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customer Can't Delete Addresses in Address Book

    Compare your templates and override files to the original default files and that should help you locate the issue ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5

    Default Re: Customer Can't Delete Addresses in Address Book

    I'm running 1.5. I upgraded back in Feb.with no significant issues.

    I'm having the same problem with address deletion as mentioned in the beginning of this thread. However, it does not matter if I use the classic template or my own. When a customer navigates to my account/view or change addresses/delete they are asked "Are you sure you would like to delete the selected address from your address book?" and if one selects "Delete" nothing happens. I'm not sure if this problem has existed since the upgrade or is a new problem. I do know that before upgrading, this feature worked fine.

    My site www.immortalitea.com

  6. #6
    Join Date
    Dec 2007
    Posts
    12
    Plugin Contributions
    0

    Default Re: Customer Can't Delete Addresses in Address Book

    I also had the problem, addresses could not be deleted from address book in any templates in v1.5 .
    The only way i found to get it to work was to change:

    Code:
    if (isset($_GET['action']) && ($_GET['action'] == 'deleteconfirm') && isset($_POST['delete']) && is_numeric($_POST['delete'])) {
      $sql = "DELETE FROM " . TABLE_ADDRESS_BOOK . "
              WHERE  address_book_id = :delete
              AND    customers_id = :customersID";
    
      $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
      $sql = $db->bindVars($sql, ':delete', $_POST['delete'], 'integer');
      $db->Execute($sql);
    to:
    Code:
    if (isset($_GET['action']) && ($_GET['action'] == 'deleteconfirm') && isset($_GET['delete']) && is_numeric($_GET['delete'])) {
      $sql = "DELETE FROM " . TABLE_ADDRESS_BOOK . "
              WHERE  address_book_id = :delete
              AND    customers_id = :customersID";
    
      $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
      $sql = $db->bindVars($sql, ':delete', $_GET['delete'], 'integer');
      $db->Execute($sql);
    Ajeh, is it ok to use _GET['delete'] here?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Customer Can't Delete Addresses in Address Book

    Could you check the files:
    \includes\templates\template_default\templates\tpl_address_book_process_default. php
    \includes\modules\pages\address_book_process\header_php.php

    \includes\templates\your_template_dir\templates\tpl_address_book_process_default .php

    against the original files in Zen Cart v1.5 and see if they are current ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Feb 2016
    Posts
    28
    Plugin Contributions
    0

    Default Re: Customer Can't Delete Addresses in Address Book

    Quote Originally Posted by Ajeh View Post
    Could you check the files:
    \includes\templates\template_default\templates\tpl_address_book_process_default. php
    \includes\modules\pages\address_book_process\header_php.php

    \includes\templates\your_template_dir\templates\tpl_address_book_process_default .php

    against the original files in Zen Cart v1.5 and see if they are current ...
    I had this issue in my site. The issue was in the following file:

    \includes\templates\your_template_dir\templates\tpl_address_book_process_default .php

    Check to make sure that the code around line 32 looks like the code in original Zen Cart files.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: Customer Can't Delete Addresses in Address Book

    You don't say what version of ZC you're using here or on your other post (it's over 4 years old) but this thread was from five+ years ago so I don't think the files are going to look quite the same.

    What version were you having a problem with?

  10. #10
    Join Date
    Feb 2016
    Posts
    28
    Plugin Contributions
    0

    Default Re: Customer Can't Delete Addresses in Address Book

    Quote Originally Posted by dbltoe View Post
    You don't say what version of ZC you're using here or on your other post (it's over 4 years old) but this thread was from five+ years ago so I don't think the files are going to look quite the same.

    What version were you having a problem with?
    I didn't see anyone post here a definitive solution, just some suggested places to look. I confirmed in a 1.5.1 instance that this bug was related to template specific coding and not to the ZenCart core. The key here is to compare what is in your templates\tpl_address_book_process_default.php file to what is in the same file for the default template in Zencart (same version). That will zero in on what code is causing the issue for your specific build.

 

 

Similar Threads

  1. Email Address Exporter - How can I export the email addresses of every customer?
    By SpencerW in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 14 Oct 2011, 07:35 AM
  2. Allowing the customer to delete / edit address book entries
    By prodigious in forum Managing Customers and Orders
    Replies: 6
    Last Post: 3 Nov 2008, 04:42 PM
  3. Replies: 0
    Last Post: 17 Sep 2008, 12:35 AM
  4. Replies: 2
    Last Post: 26 Feb 2008, 06:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR