Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Admin customer update data validation

    I would like to validate custom customer data in admin/customers.php without using javascript form validation. If the data input is bad, I want to display a message at the top of the admin customer update form page. I've set up an observer triggered by the NOTIFY_ADMIN_CUSTOMERS_UPDATE_VALIDATE notifier. If the $_POST custom data is bad, I set $error to true and added a session message to $messageStack. But the message does not display on the page that appears when the update button is clicked. You have to click the update button on that page again to get the message to appear.

    Is there any way to get the message to display on the customer update form page when the update button is clicked instead of clicking update twice to get the message displayed?

    Thank you!
    Dave
    zc157c, php 8.0.2

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,576
    Plugin Contributions
    88

    Default Re: Admin customer update data validation

    When an error is found in the admin's Customers :: Customers tool, a page-redirect doesn't occur, so you should be using $messageStack->add(), not $messageStack->add_session().

  3. #3
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Admin customer update data validation

    Quote Originally Posted by lat9 View Post
    When an error is found in the admin's Customers :: Customers tool, a page-redirect doesn't occur, so you should be using $messageStack->add(), not $messageStack->add_session().
    Thank you, thank you, thank you!!!! Works great!
    Dave224

 

 

Similar Threads

  1. how do I turn off the data validation tool?
    By tcarden in forum Addon Payment Modules
    Replies: 0
    Last Post: 18 Oct 2013, 10:03 PM
  2. Custom Customer Data To Order Data
    By fotofx in forum General Questions
    Replies: 1
    Last Post: 22 Aug 2010, 08:10 PM
  3. Real time data validation of shipping addresses?
    By FredZ in forum General Questions
    Replies: 0
    Last Post: 27 Aug 2008, 07:09 AM
  4. update products with data manager?
    By elgabi in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 7 Sep 2006, 10:42 PM

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