Title: cannot create discount codes
Last modified: August 30, 2016

---

# cannot create discount codes

 *  Resolved [riquez](https://wordpress.org/support/users/riquez/)
 * (@riquez)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/cannot-create-discount-codes/)
 * When I try adding a discount code & filling in the details + submit, it says “
   Discount code details entered”, but nothing shows up. There are no discount codes
   displayed anywhere.
 * What could be wrong?
    I don’t see a discount code table in the data either.
 * [https://wordpress.org/plugins/eshop/](https://wordpress.org/plugins/eshop/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [riquez](https://wordpress.org/support/users/riquez/)
 * (@riquez)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638675)
 * I also can’t find anywhere in the basket or checkout that a customer can enter
   a code – something odd is going on ??
 *  Thread Starter [riquez](https://wordpress.org/support/users/riquez/)
 * (@riquez)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638676)
 * I looked in the eshop-install.php file where the initial tables are created
    
   I dont have
 * • eshop_discount_codes
    • eshop_download_orders
 * but i seem to have all the others. Is that normal?
 *  Thread Starter [riquez](https://wordpress.org/support/users/riquez/)
 * (@riquez)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638677)
 * I ran the missing table instal queries “CREATE TABLE etc
    & now of course everything
   is suddenly working – the checkout has a box for discount codes & I can create
   codes in admin.
 * You better have your plugin to check that the tables exist -I have no idea how
   the script managed to skip over those 2 tables, but it did.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638799)
 * This is not an issue we have encountered before in the plugin’s 8+ year history,
   so we can only assume that this was specific to your site/install. Glad to hear
   that you managed to fix it.
 *  [lageodesign](https://wordpress.org/support/users/lageodesign/)
 * (@lageodesign)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638882)
 * I am having the exact same problem on at least two shop sites. I’m missing the
   eshop_discount_codes. How do I get it back? I do not know what the tables settings
   are, please help…
 *  Thread Starter [riquez](https://wordpress.org/support/users/riquez/)
 * (@riquez)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638883)
 * Login to mySQL (for many people this will be phpmyadmin control panel on their
   hosting)
    Select the correct database & run the query to create the table – If
   found the query in the eshop-install.php file, around line 749 in my version.
   This is the query in my version:
 *     ```
       CREATE TABLE eshop_discount_codes (
       		  id int(11) NOT NULL auto_increment,
       		  dtype tinyint(1) NOT NULL default '0',
       		  disccode varchar(255) NOT NULL default '',
       		  percent float(5,2) NOT NULL default '0.00',
       		  remain varchar(11) NOT NULL default '',
       		  used int(11) NOT NULL default '0',
       		  enddate date NOT NULL default '0000-00-00',
       		  live char(3) NOT NULL default 'no',
       		  PRIMARY KEY  (id),
       		  UNIQUE KEY disccode (disccode)
       		);
       ```
   
 * Note that i had to modify the code slightly to change the variables $table & 
   $charset_collate
 * If this doesnt work or is complex, then I would suggest to try installing it 
   again.
 *  [lageodesign](https://wordpress.org/support/users/lageodesign/)
 * (@lageodesign)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638884)
 * Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘cannot create discount codes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eshop_d6e4b8.svg)
 * [eShop](https://wordpress.org/plugins/eshop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eshop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eshop/)
 * [Active Topics](https://wordpress.org/support/plugin/eshop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eshop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eshop/reviews/)

## Tags

 * [discount code](https://wordpress.org/support/topic-tag/discount-code/)

 * 7 replies
 * 3 participants
 * Last reply from: [lageodesign](https://wordpress.org/support/users/lageodesign/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/cannot-create-discount-codes/#post-6638884)
 * Status: resolved