Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

create database for points system


estherm

Recommended Posts

hi all!

 

I need a little hand with this... I'm trying to install the points reward system contribution on my website. I'm getting familiar with the whole contribution adding thing, but still very confused when it comes to creating a database in phpmyadmin.

 

The contribution asks to create a database as follows:-

 

*/

 

ALTER TABLE customers ADD customers_shopping_points decimal(15,2) NOT NULL default '0.00';

 

#

# Table structure for table 'customers_points_pending'

#

 

DROP TABLE IF EXISTS customers_points_pending;

CREATE TABLE customers_points_pending (

unique_id int(11) NOT NULL auto_increment,

customer_id int(11) NOT NULL default '0',

orders_id int(11) NOT NULL default '0',

points_pending decimal(15,2) NOT NULL default '0.00',

comment VARCHAR(200),

date_added datetime NOT NULL default '0000-00-00 00:00:00',

status int(3) NOT NULL,

PRIMARY KEY (unique_id)

) TYPE=MyISAM;

 

 

INSERT INTO `configuration_group` (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES ('22', 'Points/RewardsV1.60', 'Points/Rewards System Configuration', '22', '1');

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Enable Points system', 'USE_POINTS_SYSTEM', 'true', 'Enable the system so customers can earn points for orders made?', '22', '1', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Enable Redemptions system', 'USE_REDEEM_SYSTEM', 'true', 'Enable customers to Redeem points at checkout?', '22', '2', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Points per 1.Yen purchase', 'POINTS_PER_AMOUNT_PURCHASE', '1', 'No. of points awarded for each 1. YEN spent.<br>(currency defined according to admin default currency)', '22', '3', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Yen Redeem per point', 'REDEEM_POINT_VALUE', '0.1', 'The value of one point.<br>(pointvalue currency defined according to admin default currency)', '22', '4', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Auto Credit Pending Points', 'POINTS_AUTO_ON', 'false', 'Enable Auto Credit Pending Points?<br>Pending points will be auto confirmed after every success checout', '22', '5', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Award points for shipping', 'USE_POINTS_FOR_SHIPPING', 'false', 'Enable customers to earn points for shipping fees?', '22', '6', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Award points for Tax', 'USE_POINTS_FOR_TAX', 'false', 'Enable customers to earn points for Tax?', '22', '7', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Award points for Specials', 'USE_POINTS_FOR_SPECIALS', 'true', 'Enable customers to earn points for items already discounted?<br>When set to false, Points awarded only on items with full price', '22', '8', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Award points for order with redeemed points', 'USE_POINTS_FOR_REDEEMED', 'true', 'When order made with Redeemed Points. Enable customers to earn points for the amount spend other then points?<br>When set to false, customers will NOT awarded even if only part of the payment made by points.', '22', '9', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Enable Products Restriction', 'REDEMPTION_RESTRICTION', 'false', 'Enable the products Restriction ?', '22', '10', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'If Restriction enabled set model Allowed.', 'RESTRICTION_MODEL', 'DVD-FRAN', 'Restriction Products by model.<br>If Restriction enabled set model Allowed.', '22', '11', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Or set Product ID Allowed.', 'RESTRICTION_PID', '15', 'Restriction Products by Product ID.<br>If Restriction enabled set a comma separated list of Products ID Allowed.<br>leave blank if restriction set to model.', '22', '12', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Or set Category ID Allowed.', 'RESTRICTION_PATH', '', 'Restriction Products by Category ID.<br>If Restriction enabled set a comma separated list of Cpaths Allowed.<br>leave blank if restriction set to model.', '22', '13', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Enable Products Price Restriction', 'REDEMPTION_DISCOUNTED', 'false', 'When customers redeem points, do you want to exclude items already discounted ?<br>Redeemptions enabled only on items with full price', '22', '14', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'If you wish to limit points before Redemptions, set points limit to', 'POINTS_LIMIT_VALUE', '0', 'Set the No. of points nedded before they can be redeemed. set to 0 if you wish to disable it', '22', '15', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'If you wish to limit points to be use per order, set points Max to', 'POINTS_MAX_VALUE', '1000', 'Set the Maximum No. of points customer can redeem per order. to avoid points maximum limit, set to high No. ', '22', '16', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Limit Points Redemptions to exact amount.', 'POINTS_LIMIT_EXACT', 'false', 'Do you want to limit points redemptions to exact amount(This will disable customers ability to choose points amount to spend)?', '22', '17', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'If Points Exact amount enabled, set the exact amount', 'POINTS_EXACT_VALUE', '100', 'If you enabled the Points Redemptions to exact amount, set the exact amount of points to be reddemed<br>only this amount will be redemed.', '22', '18', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Restrict Points Redemption For Minimum Purchase Amount', 'POINTS_MIN_AMOUNT', '', 'Enter the Minimum Purchase Amount(total cart contain) required before Redemptions enabled.<br>Leave empty for no Restriction', '22', '19', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'New signup customers Welcome Points amount', 'NEW_SIGNUP_POINT_AMOUNT', '0', 'Set the Welcome Points amount to be auto-credited for New signup customers. set to 0 if you wish to disable it', '22', '20', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Maximum number of points records to display', 'MAX_DISPLAY_POINTS_RECORD', '20', 'Set the Maximum number of points records to display per page in my_points.php page', '22', '21', '', now(), NULL, NULL);

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Display Points information in Product info page', 'DISPLAY_POINTS_INFO', 'true', 'Do you want to show Points information Product info page?', '22', '22', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Keep Records of Redeemed Points', 'DISPLAY_POINTS_REDEEMED', 'true', 'Do you want to keep records of all Points redeemed?', '22', '23', '', now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Sort Order', 'MODULE_ORDER_TOTAL_REDEMPTIONS_SORT_ORDER', '4', 'Sort order of display.', '6', '2', '', now(), NULL, NULL);

 

 

Could Anyone please help me out with this? do I just copy the text above somewhere???

 

Many thanks.

 

Esther.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...