Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2 Stores, 2 Domains, 1 Database - How do you do this?


RMD27

Recommended Posts

The store I have is too modified to install SPPC.

 

So I want to setup another store on another domain with SPPC pre-installed. And I want the new store to use the original stores database.

 

Mainly for the product information.

 

I don't want to have to update two sites every time I change something.

 

So my question is, how do I get this new store to take the information from the original shop's database so it gets populated with the same products?

 

Ill cross the bridge over the details of checking out and two admin areas etc etc after. At the moment I just want to get the two stores using the same database.

 

Im assuming I can update the original database with the changes SPPC requires without any issues?

 

Im not sure if its clear what I mean?

 

Any thoughts/help/ideas/solutions appreciated.

Link to comment
Share on other sites

So my question is, how do I get this new store to take the information from the original shop's database so it gets populated with the same products.

 

I think you can just point the configuration files for the new store to the original shops database. Give that I try...I'm doing the same thing that you are wanting to do but using that same database across 3 sites....as I recall that is all that I had to do to share the database....getting the right products to show up on the right site is another matter. :)

 

Dan

Link to comment
Share on other sites

Okay I have the products showing.

 

Big question this for an amateur like myself.

 

Can I run the sql query for the SPPC contribution on the original database so the options are working in the new shop?

 

ie Can i do it without causing damage?

 

Obviously its down to me 100% and I should back up but hypothetically speaking.....

 

this is the sql query

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Hide Prices From Guest', 'PRICES_LOGGED_IN', 'false', 'Hide prices from guest and not place orders', 72, 5, '2001-11-28 14:25:10', '2001-11-17 11:22:55', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('B2BSuite method', 'B2B', 'false', 'Choose TRUE for Markup or FALSE for Discount.', 72, 1, '2003-10-06 17:24:00', '2003-10-06 17:24:00', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('MEMBER APPROVATION', 'MEMBER', 'false', 'Choose if customers account must be approved by admin.<br>Approve (true) Free account (false)', 72, 6, '2004-02-26 19:30:00', '2004-02-26 19:30:00', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('VAT Number', 'ACCOUNT_PIVA', 'true', 'Show VAT Number', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('VAT Number Required', 'ACCOUNT_PIVA_REQ', 'false', 'Is VAT Number required?', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Tax Identification Number', 'ACCOUNT_CF', 'true', 'Show Tax Identification Number', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Tax Identification Number Required', 'ACCOUNT_CF_REQ', 'true', 'Is Tax Identification Number required?', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Check VAT number', 'ENTRY_VAT_CHECK', 'true', 'Check European VAT number into http://europa.eu.int VIES server', 5, 1, NULL, '2003-06-01 17:41:12', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');

DROP TABLE IF EXISTS customers_groups;
CREATE TABLE `customers_groups` (
 `customers_group_id` int(11) NOT NULL auto_increment,
 `customers_group_name` varchar(32) NOT NULL default '',
 `customers_group_discount` decimal(11,2) NOT NULL default '0.00',
 `color_bar` varchar(8) NOT NULL default '#FFFFFF',
 `group_payment_unallowed` varchar(255) NOT NULL default 'cc',
 `group_tax` varchar(5) NOT NULL default 'false',
 PRIMARY KEY  (`customers_group_id`)
) ENGINE=MyISAM;

DROP TABLE IF EXISTS products_groups;
CREATE TABLE products_groups (
 customers_group_id int(11) NOT NULL default '0',
 customers_group_price decimal(15,2) NOT NULL default '0.00',
 products_id int(11) NOT NULL default '0',
 products_price decimal(15,2) NOT NULL default '0.00'
) ENGINE=MyISAM;

INSERT INTO customers_groups VALUES (1, 'wholesale', 10.00, '#FFFFFF', 'cc', '0');
INSERT INTO customers_groups VALUES (2, 'vips', 15.00, '#FFFFFF', 'cc', '0');

DROP TABLE IF EXISTS groups_to_categories;
CREATE TABLE groups_to_categories (
 customers_group_id int(11) NOT NULL default '0',
 categories_id int(11) NOT NULL default '0',
 discount decimal(11,2) NOT NULL default '0.00',
 PRIMARY KEY  (customers_group_id,categories_id)
) ENGINE=MyISAM;

ALTER TABLE specials ADD customers_group_id INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE products ADD products_percentage tinyint(1) NOT NULL default '1';
ALTER TABLE address_book ADD entry_piva varchar(11) NOT NULL default ''AFTER entry_company;
ALTER TABLE address_book ADD entry_cf varchar(16) NOT NULL default ''AFTER entry_company;
ALTER TABLE orders ADD billing_piva VARCHAR( 11 ) AFTER billing_company ;
ALTER TABLE orders ADD billing_cf VARCHAR( 16 ) AFTER billing_company ;
ALTER TABLE orders ADD customers_group_id int(11) NOT NULL default '0';
ALTER TABLE customers ADD customers_group_id INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE customers ADD member_level INT(5) DEFAULT '0' NOT NULL;
ALTER TABLE whos_online MODIFY COLUMN last_page_url VARCHAR(255) NOT NULL;
ALTER TABLE customers MODIFY COLUMN customers_default_address_id INTEGER;
ALTER TABLE customers_basket MODIFY COLUMN final_price DECIMAL(15,4);
ALTER TABLE `products` ADD `products_show_from_groups` VARCHAR( 255 ) DEFAULT '@' NOT NULL; 

Link to comment
Share on other sites

Hello Dan

 

I decided to make a copy of the database and work from that just in case.

 

But, no joy, huge problems when I try to connect to the copy, no problems when I try to connect to the original database.

 

Anyway, we are looking into it at the moment, there doesnt appear to be any reason for these to be a problem so it could take some time......

Link to comment
Share on other sites

Another issue. The products are not showing. They count in the categories nav box but are not visible.

 

However if I go to the admin and edit a product, even if I do not change anything, it shows. The fact of saving the product manually does the trick

 

Obviously I dont want to have to do this for every product though, any tips? Did you get this?

Link to comment
Share on other sites

No I didn't have any issues like that....sounds like a database issue to me. Maybe you can look in the database and compare an item that shows up with one that doesn't to see if you can see any differences.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...