Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default New Coupons Always Inactive

    This issue is occurring in BOTH my live store and the development shop. Everytime I create a new coupon the "coupon_active" column is set to NULL. I have to go into the DB and manually set the "coupon_active" column to "Y". I realize this is the default value for this column, but I expect that when I create a new coupon that this value will be set to "Y".

    Code:
    CREATE TABLE `zen_coupons` (
      `coupon_id` int(11) NOT NULL AUTO_INCREMENT,
      `coupon_type` char(1) DEFAULT NULL,
      `coupon_code` varchar(32) DEFAULT NULL,
      `coupon_amount` decimal(15,4) NOT NULL DEFAULT '0.0000',
      `coupon_minimum_order` decimal(15,4) NOT NULL DEFAULT '0.0000',
      `coupon_start_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
      `coupon_expire_date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
      `uses_per_coupon` int(5) NOT NULL DEFAULT '1',
      `uses_per_user` int(5) NOT NULL DEFAULT '0',
      `restrict_to_products` varchar(255) DEFAULT NULL,
      `restrict_to_categories` varchar(255) DEFAULT NULL,
      `restrict_to_customers` text,
      `coupon_active` char(1) DEFAULT NULL,
      `date_created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
      `date_modified` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
      `coupon_zone_restriction` int(11) NOT NULL DEFAULT '0',
      `manufacturer_ids` varchar(100) DEFAULT NULL,
      `sales_eligible` tinyint(1) DEFAULT '0',
      PRIMARY KEY (`coupon_id`),
      KEY `idx_active_type_zen` (`coupon_active`,`coupon_type`),
      KEY `idx_coupon_code_zen` (`coupon_code`),
      KEY `idx_coupon_type_zen` (`coupon_type`)
    ) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8
    Any ideas???
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: New Coupons Always Inactive

    In the meantime I've modified the coupon table so the default value is "Y" for the "coupon_active" column.. Seems to solve the issue..

    Code:
    ALTER TABLE `coupons` CHANGE `coupon_active` `coupon_active` CHAR(1)DEFAULT 'Y' NULL;
    Would like to know what the issue was in the first place.. It truly CAN'T be THIS simple..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: New Coupons Always Inactive

    In my stock Zencart test site (custom Classic-clone template, no mods), when I create a coupon, it is set to Active in the DB, even if I specify a start date to a date in the future, and the DB default is Y. What's different on your sites ? Upgrade from an earlier version?

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: New Coupons Always Inactive

    Quote Originally Posted by stevesh View Post
    In my stock Zencart test site (custom Classic-clone template, no mods), when I create a coupon, it is set to Active in the DB, even if I specify a start date to a date in the future, and the DB default is Y. What's different on your sites ? Upgrade from an earlier version?
    Honestly NONE of the mods I've made to this site alter the coupon_admin.php file or any of the coupon tables.. so to answer your question.. I've NO CLUE what's different.. I can say that I've had a variety of strange issues since the host updated this client the PHP to 5.4.. I don't think this is related to that.. **shrugs** I do know that the DB change I've made has solved the issue for now..

    I DID discover that the coupon_restrict.php files had an issue which rendered a blank page (and strangely NO error logs) which I resolved by replacing it with the v1.5.2 version of the file..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. coupons expired not showing inactive
    By barco57 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 41
    Last Post: 18 Dec 2018, 03:42 AM
  2. New Coupons Always Inactive
    By JohnnyT in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 13 Aug 2011, 05:23 PM
  3. Replies: 10
    Last Post: 1 Feb 2007, 04:10 AM

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