use shopping400;
alter table customers add pointstotal int NULL default 0;
alter table customers add pointsremaining int NULL default 0;
alter table customers add vatnumber varchar (50) NULL;
alter table orders add opoints int NULL default 0;
alter table orders add vatnumber varchar (50) NULL;
alter table orders add commission money NULL default 0;
alter table products add points int NULL default 0;
alter table products add pointstobuy int NULL;
alter table products add price2 money NULL;
alter table products add price3 money NULL;
alter table categories add catmemo varchar (2000) NULL ;
alter table tbllog add fldipaddress varchar(40) NULL ;
alter table affiliates add referralid int NULL ;
alter table affiliates add mastercommissionrate real NULL ;
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xpointsredeem','Yes','option',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcategorydisplaytext','No','products1',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcategoryusetemplate','No','products1',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcategorydisplaytemplate','tmp_categorytemplate.htm','products1',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xsearchsortfields','','products1',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xsearchsortcaptions','','products1',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcustomerpricetypes','','customer',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcustomerpricefields','','customer',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcustomerpriceidentifier','contacttypeid','customer',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('affmultilevel','No','aff',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('affmastercommissionrate','.05','aff',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('affcommissioncategory','No','aff',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('affcommissionproduct','No','aff',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xtaxincludedinprice','No','payment',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xorderstatus','','customer',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xvatnumber','No','customer',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xvatcountry','','customer',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xpoints','No','option',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xpointsfield','points','option',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcartstaticquantity','No','advanced',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xautoloadconfiguration','No','advanced',1);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('xshippingotherfields','shipping',0);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('xshippingothercaptions','shipping',0);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('xshippingotherequired','shipping',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xshippingsetfields','No','shipping',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xproductfiltering','No','products1',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xtaxeucountries','UK,ES,IT,FR,DE,NL,DK,GR,EN,PT,FI,SE,IE,LU,BE','payment',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xtaxeurate','.175','payment',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xtaxeu','No','payment',1);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('affcommissionproductfield','aff',0);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('affcommissioncategories','aff',0);
Insert into configuration(fieldname,fieldgroup,fieldyesno) values('xtaxexcludeproducts','payment',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xproductminimumquantity','No','products1',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xproductminimumlist','6','products1',0);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcategoriessimple','No','advanced',1);
Insert into configuration(fieldname,fieldvalue,fieldgroup,fieldyesno) values('xcontactform','Yes','customer',1);
go