Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi-Stores Multiple Shops Support


hobbzilla

Recommended Posts

it sounds like your quantity discount is messing up your specials discount.

check it by set quantity discount to 0

 

 

I finally got it to work. i had to change a line in the price_schedules class. I move on to another problem with items on special though and giving them multiple quantity discounts.

 

If i give the product a discount after purchasing 1 item it works, but then i give it another discount after you purchase 6 or more. the price always stays the same as if you where just buying 1.

 

so lets say an item has a price break of 5.00 for one item, but after purchasing in bulk say 10 items at once the price goes to 2.50 per item. it will not work. the items will always stay at 5.00 even when you buy 10.

 

Again if you take the item off special it works perfectly.

Link to comment
Share on other sites

OK... this is what I am looking at... please let me know if I am on the right track by using the add-on.

 

One "mall storefront" where people can see product from ALL my vendors.

Multple "sub-shops" which the vendor can moderate... add products... see sales... etc.

 

I would like to have ONE check out. (I will be collecting the cash and then paying off the vendors)

 

Is this correct?

Link to comment
Share on other sites

Hi Hobbz,

 

I'm working on a project and have heavily modded Multi-Stores.

 

In post #1017716, you responded to the question posed by dbcabot:

 

"I will like show in product_info.php the name, image, ... about his shop (shop1, shop2 or shop3).

The code "echo STORE_NAME" show the principal SHOP name (because all products are in principal SHOP) but I like show the shop1 name."

 

Your answer was:

 

"Then with that result, query the configuration table returned for the STORE_NAME value and replace the "echo STORE_NAME" with an echo $store1_query("configuration_value")"

 

In admin/includes/header.php

 

I've modified the following code to show the user logged in in the left column in admin.

 

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '" class="headerLink">' . HEADER_TITLE_TOP . '</a>  » ' . STORE_NAME . (!tep_session_is_registered('user_name') ? '' : '    ' . sprintf(TEXT_LOGGED_IN_AS, $user_name) . ')'); //rmh M-S_multi-stores ?>

 

Here's what I have and it's working properly:

 

<?php echo (!tep_session_is_registered('user_name') ? '' : '<br>' . sprintf($user_name)); ?>

 

How would I go about showing the store's name as well? I'm not very proficient with MySQL and could really handle some help.

 

Would you be able to offer any suggestions?

Link to comment
Share on other sites

hopefully someone can help with with a prduct listing query. what i need is to have this only show products from shop a and shop b, right now it shows all products from shop a-d

 

 

	$result = tep_db_query("
	SELECT pd.products_name, p.products_id, cd.categories_name, ptc.categories_id 
	FROM " . TABLE_PRODUCTS . " p 
	LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd 
	ON pd.products_id=p.products_id 
	LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc 
	ON ptc.products_id=p.products_id 
	LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd 
	ON cd.categories_id=ptc.categories_id 
	WHERE pd.language_id = '" . (int)$languages_id . "' 
	ORDER BY categories_name");
	while($row = tep_db_fetch_array($result))
	{
		extract($row,EXTR_PREFIX_ALL,"db");
		$ProductList[$db_categories_id][$db_products_id] = $db_products_name;
		$CategoryList[$db_categories_id] = $db_categories_name;
		$LastCategory = $db_categories_name;
	}

Link to comment
Share on other sites

Hi, I'm very interested in this contribution. I was hoping for an answer to a few question, with your help.

 

1. Multi store - WWW.Megaphones.com (Store1), www.trumpets.com (store2) OR www.mystore.com/megaphones (store1), www.mystore.com/trumpets - which format is used or can both be used?

 

2. With Multi stores, this would lead to multi vendors does this contribution support directly multi vendors?

 

3. If multi vendors are not part of this contribution, does it work well with the multi Vendor contribution?

 

4. Let say you had 4 stores set up and running, are all sales from the 4 store channeled to one admin?

 

5. Are the number of stores supported, unlimited?

 

 

Thanks

 

Mark

Link to comment
Share on other sites

B)-->

QUOTE(Mark B @ Aug 4 2007, 07:42 PM) <{POST_SNAPBACK}>
Hi, I'm very interested in this contribution. I was hoping for an answer to a few question, with your help.

 

1. Multi store - WWW.Megaphones.com (Store1), www.trumpets.com (store2) OR www.mystore.com/megaphones (store1), www.mystore.com/trumpets - which format is used or can both be used?

 

You can do either format with this contribution

 

 

 

4. Let say you had 4 stores set up and running, are all sales from the 4 store channeled to one admin?

 

Yes all store admins are run through the same admin

 

5. Are the number of stores supported, unlimited?

 

as far as i know it is.

 

Thanks

 

Mark

Link to comment
Share on other sites

Hello,

 

I'm working on setting up the multi-stores module, and got an error that register_globals is required. Looking at the code, I see:

 

// check if register_globals is enabled.
// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.
 if (function_exists('ini_get')) {
ini_get('register_globals') or exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.');
 }

 

That seems to imply that it might be possible to run without register_globals, which I'd rather do. Is this the case, or is register_globals truly required? The rest of osCommerce doesn't seem to require it. I'm running PHP 5.

 

Thanks for any information!

Link to comment
Share on other sites

basically im working on a new specials page, the only issue i have is i cannot get this statement to pull the selected stores ID form the drop down menu on the top of the page

 

tep_db_query("INSERT INTO " . TABLE_SPECIALS . " (products_id, specials_date_added, status, $key_fields, stores_id) VALUES ('" . (int)$product_id . "', now(), '1', $value_fields, '" . (int)$selected_store_id . "')");

 

 

all it will insert into the stores_id column is 0.

Link to comment
Share on other sites

First allow me to preface my following post by saying I think this contrib is a freaking brilliant idea. Next, allow me to say I am completely new to osCommerse.

 

Now, I have followed the instructions that came along in the .zip file with multi-stores. My end result, however, is that navigating to the second store (we'll call it storeB) I created just gives me a completely blank page. When I switch the define('TABLE_CONFIGURATION', 'configuration'); constant in the storeB's database_tables.php file to 'configuration' (the same table that storeA uses) navigating to storeB works, but of course it is displayed with storeA's config/products.

 

Originally, on inspecting the db tables in mysql, I thought the problem was due to the fact that the "Insert default configuration table?" option (available when adding a new store through the admin menu) was creating a table with some extra columns that weren't present in the configuration table that the original install of osCommerse created.

So I removed the table 'configuration_storeB' and re-created it manually by creating a table like this first one, and copying the information from the working storeA config table to the new configuration_storeB table. I edited the new table data to conform to my second stores configuration. I am getting the same result as before. No errors... just a blank page.

 

any ideas?

Edited by maskddingo
Link to comment
Share on other sites

I suggest that go for a fresh install.

Create second store.

 

Now rename the config table as stated.

 

Thru admin add products and category to the new store.

 

How multistore works:

1)Each store has its own config table.(To manage in each database_tables.php we are asked to change the config table name).This way each store has its own set of configuration.

2)Products and categories are mapped to store thru some store id logic.

3)Pricing is also mapped thru some logic so as to allow diff stores have differenct prices.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

I also would like to add, that the 'defines' the installation document told me to comment out of the config.php files weren't even listed there.... there were similar ones.. but the names of the constants did not match up... For example: none of these were there

 

//define('HTTP_CATALOG_SERVER', '');

// define('HTTPS_CATALOG_SERVER', '');

// define('ENABLE_SSL_CATALOG', '');

 

Instead I have the similar constant names, just minus "CATALOG"

as in:

 

define ('HTTP_SERVER','');

define ('HTTPS_SERVER','');

define ('ENABLE_SSL','');

 

 

I'm thinking this might be because the install document is outdated... Should I just treat these as the ones they are talking about in the install document?

Link to comment
Share on other sites

This is where I am getting confused!

 

Step 5: Go to /admin -> catalog -> stores -> "Insert" (enter info -- at least a name) continue until you are finished for each store.

 

When I go into Store Admin (I assume we are talking about the site admin on the web) it asks for url to the catalog (There is no /catalog folder that I can see) and where do I find the config table?

 

Step 6: Copy /catalog and rename it whatever you like however many times you like (1 for each store)

 

Very confused here... what catalog and where do I find it? FTP? Database? Are we talking about the ENTIRE program that was uploaded here?

 

Step 7: Open /catalog/install/oscommerce.sql and copy all of the

INSERT INTO configuration statements and paste them into your favorite text editor.

 

I am lost so none of this makes sense at all.

 

Step 8: Do a search and replace for "INSERT INTO configuration" and replace with "INSERT INTO store2_configuration" (or naming them something of value "chuckstools_configuration".

 

Is this in the database or are these files... or is this on the admin site?

 

Step9: Update the osC sql db with the modified INSERT statments. Repeat Step 8 & 9 for each store (*making sure to change # or name for each store)

 

I get this part... I think.

 

Step10: Go to admin -> catalog and assign categories & products to the stores you desire.

 

GOD am I confused... sorry guys/gals... newbie here!

Link to comment
Share on other sites

Oops... I started at the beginning of the thread (which was back in 2005) so a lot has changed.

 

As I am looking through the new install... I am still confused however and I hope someone can help me.

 

What does this mean?

 

Create store by clicking on "Store" link on left hand side. Click "Insert". 'Store Name' (e.g. My Second Store) & 'configuration table' (e.g. configuration_store2) are required fields. The store's image is used for the catalog logo & packing slip/invoices (if left blank, the osCommerce image will be the default). I highly suggest checking "Insert default configuration table". However, for heavily modified stores that have made a lot of updates to the configuration table, you may wish to perform one of the following:

 

I went to the "Stores" area and hit insert.

It asks for the Store Name (simple enough) the URL to the catalog (simple enough) but then it asks for Store Config Table (I have NO idea what to put here so I kept the word "configuration")

 

Now I am up to this...

 

Update the admin/stores.php and add your other, previously installed contribution configuration table updates, into the INSERT section (you can't miss it -- lines 72-241). Make sure and do so PRIOR to selecting the option to "Insert default configuration"

 

I have NO idea what they are talking about here! What am I supposed to do? This is a clean install and I guess I have no previously installed contribution table updates... or do I?

I have no idea where I even find "Insert default configuration".

 

Using phpmyadmin or your SQL skills, copy your existing (!After you run the MS update.sql against it!) configuration table to a new table whose EXACT name you specified during the store creation in the admin panel (i.e. configuration_store2).If you opt for this option, you MUST change the "STORES_ID" configuration_title record for EACH copied configuration table. You will need to update the 'configuration_value' to the corresponding stores_id that was auto-incremented in the stores table when you created each store.

 

Again... confused as heck.

 

Anyone who can help me?

Link to comment
Share on other sites

Ok here's what's happening now... I reinstalled everything AGAIN. As I mentioned in my last post... The constants that MS tells me to comment out in it's install docs, aren't even present in my configure.php file.... When i go to comment out similar ones, the store will not function. I can get store2 to load but only if I set it's site_id = 1 (the first stores ID) but of course this gives me sotre 1's products/configuration. When i set site_id = 2 (the number that is in the 'stores' table, i still get a blank page just like yesterday. I used mysql to replicate and copy site1's configuration table directly to a new 'configuration_store2' table (editing fields where nessesary). What's going on here?

 

Are these incompatible versions I'm installing? I have OSC-MS2-RC1 and Mulit-stores 2.0.

 

I ask this because of the differences between the configuration table and and configuration_new table that is generated through the admin screen... and the differences between the constants in my configure.php file and the ones the install docs are telling me to comment out... NONE of them are even in there to comment out in the first place...

Edited by maskddingo
Link to comment
Share on other sites

Ok here's what's happening now... I reinstalled everything AGAIN. As I mentioned in my last post... The constants that MS tells me to comment out in it's install docs, aren't even present in my configure.php file.... When i go to comment out similar ones, the store will not function. I can get store2 to load but only if I set it's site_id = 1 (the first stores ID) but of course this gives me sotre 1's products/configuration. When i set site_id = 2 (the number that is in the 'stores' table, i still get a blank page just like yesterday. I used mysql to replicate and copy site1's configuration table directly to a new 'configuration_store2' table (editing fields where nessesary). What's going on here?

 

Are these incompatible versions I'm installing? I have OSC-MS2-RC1 and Mulit-stores 2.0.

 

I ask this because of the differences between the configuration table and and configuration_new table that is generated through the admin screen... and the differences between the constants in my configure.php file and the ones the install docs are telling me to comment out... NONE of them are even in there to comment out in the first place...

Nevermind! I got it working!

 

Tonight I'm going to write a small install document telling exactly what I did... maybe this can clear up some of the ambiguity some people have been dealing with during the install process.

Link to comment
Share on other sites

I am SOOO confused here.

 

I have tried this like three times now and I can not figure ot whay I am supposed to be doing. I know I am not stupid, but this makes no sense to me.

My store is... http://www.indianaauditions.com/tickets/

I then copied the ENTIRE "tickets" catalog and made "tickets2"

 

Please walk through these steps with me in english. Apparently I am too stupid to read this and to be able to figure it out on my own.

 

Create store by clicking on "Store" link on left hand side. Click "Insert". 'Store Name' (e.g. My Second Store) & 'configuration table' (e.g. configuration_store2) are required fields. The store's image is used for the catalog logo & packing slip/invoices (if left blank, the osCommerce image will be the default). I highly suggest checking "Insert default configuration table". However, for heavily modified stores that have made a lot of updates to the configuration table, you may wish to perform one of the following:

 

1. Update the admin/stores.php and add your other, previously installed contribution configuration table updates, into the INSERT section (you can't miss it -- lines 72-241). Make sure and do so PRIOR to selecting the option to "Insert default configuration"

2. Using phpmyadmin or your SQL skills, copy your existing (!After you run the MS update.sql against it!) configuration table to a new table whose EXACT name you specified during the store creation in the admin panel (i.e. configuration_store2).If you opt for this option, you MUST change the "STORES_ID" configuration_title record for EACH copied configuration table. You will need to update the 'configuration_value' to the corresponding stores_id that was auto-incremented in the stores table when you created each store.

Link to comment
Share on other sites

Hi,

I have a small problem with the Products Price Schdules / Quantity price.

In my shop number 2 the Quantity prices show ok in every page, but when I add them to shopping cart, the price is wrong.

 

Example:

Product price is

 

1 piece 120 USD

5 piece 110 USD

 

In product_info.php that is what will show, but when you add 5 piece to shopping cart the price is 120 USD x 5 = Total 600USD

 

Can anyone help me solve this problem?

Link to comment
Share on other sites

Ok people who are fretting: I was one of you yesterday. ;)

 

This software does work... (yesterday I had my doubts)

Once you get it set up it's gonna make you smile!

However, the install instructions are indeed quite lame...

 

I promise you, I will get started with writing up the EXACT procedure I used to get my 2 sites up and running.

Edited by maskddingo
Link to comment
Share on other sites

Hi

 

I like this contribution a lot, but I have a problem adding specials.

 

When I press the 'new product' button in the admin specials section, I get an SQL error. I get different errors logged in as super-admin or as sub-admin.

I installed this contribution (version 2.0) on a clean OsCommerce MS2 release, version 060817. The errors appear to come from the part where the specials.php file was modified for this contribution. Here are the errors I receive, first logged in as superadmin, second as sub-admin:

 

<Code>

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'pd where p.products_id = pd.products_id and pd.language_id = '

 

select p.products_id, pd.products_name, p.products_price from (products p, products_description) pd where p.products_id = pd.products_id and pd.language_id = '1' order by products_name

</Code>

 

And

 

<Code>

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'pd LEFT JOIN products_to_stores p2s ON p.products_id = p2s.pro

 

select p.products_id, pd.products_name, p.products_price from (products p, products_description) pd LEFT JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p.products_id = pd.products_id and pd.language_id = '1' and p2s.stores_id in(2) order by products_name

</Code>

 

Does anybody have an idea how i can fix this?

 

thnx!, Mikee

Link to comment
Share on other sites

Hi

 

I like this contribution a lot, but I have a problem adding specials.

 

When I press the 'new product' button in the admin specials section, I get an SQL error. I get different errors logged in as super-admin or as sub-admin.

I installed this contribution (version 2.0) on a clean OsCommerce MS2 release, version 060817. The errors appear to come from the part where the specials.php file was modified for this contribution. Here are the errors I receive, first logged in as superadmin, second as sub-admin:

 

<Code>

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'pd where p.products_id = pd.products_id and pd.language_id = '

 

select p.products_id, pd.products_name, p.products_price from (products p, products_description) pd where p.products_id = pd.products_id and pd.language_id = '1' order by products_name

</Code>

 

And

 

<Code>

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'pd LEFT JOIN products_to_stores p2s ON p.products_id = p2s.pro

 

select p.products_id, pd.products_name, p.products_price from (products p, products_description) pd LEFT JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p.products_id = pd.products_id and pd.language_id = '1' and p2s.stores_id in(2) order by products_name

</Code>

 

Does anybody have an idea how i can fix this?

 

thnx!, Mikee

Link to comment
Share on other sites

I THINK I have this figured out.

THINK being the opporative word here!

 

I created two, what would be called seperate catalogue sites.

tickets (Original)

tickets2 (Which is listed as "Spotlight Players")

 

I then went under stores and created "Spotlight Players" with the url to the NEW STORE (Catalogue) "tickets2".

I put a NEW config table which I called "configuration_2" (I assume that this CREATES a new piece in the database because it appeared to work.)

 

I went into "Stores" under admin and under the "multi-stores" area and changed all the settings.

Now I assume that this is all coming out of the same databse so ALL these settings will be the SAME for each store I create... correct?

 

IT looks like this...

 

Store Catalog Website URL http://www.indianaauditions.com/ticekts

Store Catalog Website SSL URL

Enable SSL Store Catalog false

Store Catalog Website Path http://www.indiaaauditions.com/tickets/

Store Catalog Filesystem Path /home/indianaa/public_html/indianaauditions/tickets

Store Catalog Website Images Path http://www.indiaaauditions.com/tickets/images/

Store Catalog Website Languages Path http://www.indiaaauditions.com/tickets/includes/languages

Store Catalog Filesystem Languages Path /home/indianaa/public_html/indianaauditions/tickets/includes/languages/

Store Catalog Filesystem Images Path /home/indianaa/public_html/indianaauditions/tickets/images/

Store Catalog Filesystem Modules Path /home/indianaa/public_html/indianaauditions/includes/modules/

 

Am I on the right track so far?

 

So all I need to do is to copy ANOTHER copy of my original store "tickets" and do all the same stpes again... using EXACTALLY the same configurations as shown above.

 

Am I doing all this right thus far?

 

I have been using OSCMALL for the past few weeks and HATE IT! It is SOOOOO buggy, and the guy who created it... while quite brilliant... just doesn't have the time to support it. THIS looks like a much more stable version of what I am looking to do.

Link to comment
Share on other sites

OK... I must have something wrong at this point because I go into the secondary created stores and I can't change ANY of the account information.

 

Any help here would be appreciated!

Link to comment
Share on other sites

What does it mean when it says "Copy Installation Point for each store created?

 

OK... confused again!

 

It tells me to go into each of the new store's config statement and change TABLE_CONFIGURATION value.

There is no specific TABLE_CONFIGURATION value that I can see.

 

I thought I was brilliand... but apparently I STILL can't figure this out!

Link to comment
Share on other sites

What does it mean when it says "Copy Installation Point for each store created?

 

OK... confused again!

 

It tells me to go into each of the new store's config statement and change TABLE_CONFIGURATION value.

There is no specific TABLE_CONFIGURATION value that I can see.

 

I thought I was brilliand... but apparently I STILL can't figure this out!

 

TABLE_CONFIGURATION is a constant defined in each stores respective /includes/database_tables.php file ... it should be on or about line 20...

 

define('TABLE_CONFIGURATION', 'configuration');

 

The purpose is to define for each store to the correct configuration table in the database that you want that store to use...

Leave this value alone for the first store, but for the second store you need to change the line in /(store2_catalog_root)/includes/database_tables.php to:

 

define('TABLE_CONFIGURATION', 'configuration_2'); where 'configuration_2' is the name of your new stores configuration table that you selected when you first 'inserted' the new store through the admin page.

Edited by maskddingo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...