chrometweaks.org

Free iPage web hosting that let you use more than CSS, HTML, and Java?

Click Here To View All Answers...


First question I got is Free iPage web hosting that let you use more than CSS, HTML, and Java? Thanks in advance for any answer. Second question.. I am going to set up multiple sites, selling the same items (same inventory) etc.

I am going to advertise the sites in different ways that is why I want multiple storefronts..

Can I use the same mysql database for each store?.

Can I use the exact inventory list? Or do I have to set the inventory up in each store?.

Where are the items(products) and all their info stored? Is this in the database or somewhere in my admin?.

Thanks..

Comments (68)

Good question... I dunno what is the answer to your question. I'll do some research in Google and get back to you if I find an anything. You should email the people at iPage as they probably know..

Comment #1

Steve thanks for the advice..

I am so new to osCommerce. I am not sure what a string is. Where can I go to get this info?.

Also would there be a way to tag each sale so I know what iPage site it comes from?..

Comment #2

The things you are asking for are all possible, but they require a basic knowledge of PHP and a bit of MySQL. I can point you in the right direction, but can't lead you by the hand, so to speak....

In catalog/includes/application_top.php is this code:.

// set the application parameters.

 $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from 'TABLE_CONFIGURATION);.

 while ($configuration = tep_db_fetch_array($configuration_query)) {.

   define($configuration['cfgKey'], $configuration['cfgValue']);.

This reads all of the configuration entries, set in admin, from the database. It creates a series of DEFINEs, one for each configuration entry. One example is STORE_NAME. You can get a list of all of these by opening the database in phpmyadmin (a tool your host may provide, or you can install your own) and browse table "configuration"..

So let's say that you wanted to set a different store name for the second store. In store 2's copy of application_top.php, you would insert the following after the code above:.

Define('STORE_NAME','Store the Second");.

Where "Store the Second" is the name you give to the second store. Other defines of interest are STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS and EMAIL_FROM. There are others. You need to identify which ones you want to change in the second store and insert the appropriate DEFINEs..

Now for tagging the sale, the way I would do this is add a field to the record added to the "orders" table that is hard-coded in each store's copy. You will need to add the field to the database definition. That's where some understanding of MySQL will come in handy...

Comment #3

Will see what I can do!!! thanks a million!..

Comment #4

I just noticed that I missed a line with a closing brace when I posted the code from application_top.php. Your defines would go after that brace...

Comment #5

This is all good advice..

I currently run two stores from one database myself, and I have a few clients who do the same thing. It's definitely possible. It's also a pain in the neck when you want to update your files to adjust layouts or any such things..

I would recommend looking at the multi-store mods available in the contributions section - they can walk you through the process...

Comment #6

I am going to set up multiple sites, selling the same items (same inventory) etc.

I am going to advertise the sites in different ways that is why I want multiple storefronts..

Can I use the same mysql database for each store?.

Can I use the exact inventory list? Or do I have to set the inventory up in each store?.

Where are the items(products) and all their info stored? Is this in the database or somewhere in my admin?.

Thanks..

Comment #7

All of the info is stored in the database. I don't see why you could not have two separate osCommerce stores that shared the same database. The only problem I see is that some of the store name info is in the database as well (anything you set in admin is in the database.) So you will have to tweak the code where it gets things such as the store name to perhaps use a string you define instead of fetching from the db...

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.