Zen Cart Logo
Forums / Bug Reports / [Done v1.3.8] Banner manager

[Done v1.3.8] Banner manager

Locked

Views: 2,874

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
29 Jun 2007, 2:18 PM
#1
draftdesign avatar

draftdesign

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

[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 Jul 2007, 5:46 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.8] 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 Jul 2007, 8:14 AM
#3
draftdesign avatar

draftdesign

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: [Done v1.3.8] Banner manager

DrByte:

What version of Zen Cart?
What version of MySQL ?

** Zen Cart 1.3.7
MySQL 5.0.27-community-nt
**

4 Jul 2007, 5:52 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.8] Banner manager

I would suggest this:

/includes/functions/banner.php
around line 14 you have this:```
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):
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 = [B]NULL[/B]
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 Jul 2007, 11:07 AM
#5
draftdesign avatar

draftdesign

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: [Done v1.3.8] Banner manager

Worked like a charm! :clap:

tx

Pierre

26 May 2010, 1:53 AM
#6
live2learn avatar

live2learn

New Zenner

Join Date:
May 2009
Posts:
1
Plugin Contributions:
0

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

26 May 2010, 9:09 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.3.8] Banner manager

live2learn:

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.