Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Setting up new error at checkout

    I have a dropdown box enabled on my checkout page. When a customer hasn't selected something from the dropdown, I need to redirect them to the checkout payment page and show them an error message.

    Here's what I have put for code in my checkout_confirmation header.php:

    Code:
    if (!isset($_SESSION['dropdown'])) {
      
    $messageStack->add_session('dropdown', ERROR_DROP_DOWN, 'error'); 
    
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
      
    }
    It kicks it back to the payment page, but doesn't show the error message. Can anyone help me correct where I've gone wrong?

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

    Default Re: Setting up new error at checkout

    When you do a messageStack you have to add it to an existing output on the page ...

    The tpl_checkout_payment.php has a few:
    Code:
    <?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
    <?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
    <?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>
    If you change your messageStack from:
    Code:
    $messageStack->add_session('dropdown', ERROR_DROP_DOWN, 'error');
    to something like:
    Code:
    $messageStack->add_session('checkout_payment', ERROR_DROP_DOWN, 'error');
    it should work better ...
    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
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Setting up new error at checkout

    Figured it out. OOPS.

    Code:
    if (!isset($_SESSION['dropdown'])) {
      
    $messageStack->add_session('checkout_payment', ERROR_DROP_DOWN, 'error'); 
    
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
      
    }

  4. #4
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Setting up new error at checkout

    Yep. That was it. First time I had ever done it, so I wasn't sure about the coding. Learned something new today.

    Quote Originally Posted by Ajeh View Post
    When you do a messageStack you have to add it to an existing output on the page ...

    The tpl_checkout_payment.php has a few:
    Code:
    <?php if ($messageStack->size('redemptions') > 0) echo $messageStack->output('redemptions'); ?>
    <?php if ($messageStack->size('checkout') > 0) echo $messageStack->output('checkout'); ?>
    <?php if ($messageStack->size('checkout_payment') > 0) echo $messageStack->output('checkout_payment'); ?>
    If you change your messageStack from:
    Code:
    $messageStack->add_session('dropdown', ERROR_DROP_DOWN, 'error');
    to something like:
    Code:
    $messageStack->add_session('checkout_payment', ERROR_DROP_DOWN, 'error');
    it should work better ...

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

    Default Re: Setting up new error at checkout

    Thanks for the update that this is now working for you ...
    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!

 

 

Similar Threads

  1. v154 Errors with Paypal Express Checkout (60)SSL Cert Problem/(77) error setting cert
    By jrobletto in forum PayPal Express Checkout support
    Replies: 19
    Last Post: 8 Jan 2016, 09:26 AM
  2. v153 GoDaddy PayPal error - (77) error setting certificate verify locations
    By enlightened in forum PayPal Express Checkout support
    Replies: 82
    Last Post: 31 Oct 2014, 11:17 PM
  3. UPS XML Error: cURL: Error [77]: error setting certificate verify locations
    By ultraloveninja in forum Addon Shipping Modules
    Replies: 3
    Last Post: 30 Nov 2009, 03:55 AM
  4. Setting New Products not to appear in New Product links
    By richiec in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 23 Mar 2009, 01:06 PM
  5. Replies: 3
    Last Post: 4 Feb 2009, 12:50 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