Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Posts
    6
    Plugin Contributions
    0

    Default [Done v1.3.8] Banner manager

    When looking at the banner list, clicking on "Status - Enable" and trying to re-enable the banner by clicking the "Status" icon produce the following error.

    -----------------------------------------------------------------------------------------
    1292 Incorrect datetime value: '' for column 'date_scheduled' at row 1
    in:
    [update banners set status = 1, date_status_change = now(), date_scheduled = '' where banners_id = '13']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    ------------------------------------------------------------------------------------------

    Let me know if anybody knows how to fix this issue.

    tx

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Banner manager

    What version of Zen Cart?
    What version of MySQL ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Banner manager

    Quote Originally Posted by DrByte View Post
    What version of Zen Cart?
    What version of MySQL ?
    Zen Cart 1.3.7
    MySQL 5.0.27-community-nt


  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Banner manager

    I would suggest this:

    /includes/functions/banner.php
    around line 14 you have this:
    Code:
      function zen_set_banner_status($banners_id, $status) {
        global $db;
        if ($status == '1') {
          $sql = "update " . TABLE_BANNERS . "
                  set status = 1, date_status_change = now(), date_scheduled = ''
                  where banners_id = '" . (int)$banners_id . "'";
    
          return $db->Execute($sql);
    
        } elseif ($status == '0') {
    make the following change shown in red (remove the quotes and replace with NULL):
    Code:
      function zen_set_banner_status($banners_id, $status) {
        global $db;
        if ($status == '1') {
          $sql = "update " . TABLE_BANNERS . "
                  set status = 1, date_status_change = now(), date_scheduled = NULL
                  where banners_id = '" . (int)$banners_id . "'";
    
          return $db->Execute($sql);
    
        } elseif ($status == '0') {
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jun 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Banner manager

    Worked like a charm!

    tx

    Pierre

  6. #6
    Join Date
    May 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: [Done v1.3.8] Banner manager

    Is this a bug? I was wondering why it still exists in the newest version of V 1.3.9.C

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: [Done v1.3.8] Banner manager

    Quote Originally Posted by live2learn View Post
    Is this a bug? I was wondering why it still exists in the newest version of V 1.3.9.C
    I can't replicate the problem in v1.3.9c

    What version of PHP and MySQL are you using?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Can this be done with banner manager?
    By julieoolie in forum Basic Configuration
    Replies: 21
    Last Post: 20 Sep 2010, 01:34 PM

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