Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi-Stores Multiple Shops Support


hobbzilla

Recommended Posts

If you are creating additional administrator's you need to look into the distributor section. You should be able to tie categories and products to various distributors. Then if that admin is a member of that distributor, then they would be able to edit, create new, etc. However, if I remember correctly, no one but the main admin can add top level categories.

 

HTH

 

Hi hobbzilla!

 

First of all, thank you for your great contribution! It is the perfect solution for my actual oscommerce-project.

 

Like you have written in your answer above, only the main admin can add top level categories. Now my question. Is it possible to change the code, that every admin can add top level categories?

 

I tried to change that in catalog/admin/categories.php

But unfortunately without success :(

 

If you have a hint for me how i can solve that problem, i would be very thankful!!

 

greetings

Link to comment
Share on other sites

1. Categories on second site are duplicating as if it is default site.

 

2. Shopping Cart is treated as default so what is in the default site is being accessed on the 2nd site.

 

When you get around to editing includes/database_tables.php with configuration_store2 on the second website (as per the install instructions) that will be resolved. You'll start off with a clean slate on the slave website.

 

Vger

Link to comment
Share on other sites

The whole point of the system is that only main admins can have unrestricted access to the store - but you can set up as many main admins as you like - provided you trust the other main admins not to stuff things up!

 

Vger

Hi hobbzilla!

 

First of all, thank you for your great contribution! It is the perfect solution for my actual oscommerce-project.

 

Like you have written in your answer above, only the main admin can add top level categories. Now my question. Is it possible to change the code, that every admin can add top level categories?

 

I tried to change that in catalog/admin/categories.php

But unfortunately without success :(

 

If you have a hint for me how i can solve that problem, i would be very thankful!!

 

greetings

Link to comment
Share on other sites

Hi

I am trying to add the contribution ALLPRODUCTS with multi-stores. I only need a copy of allprods.php on the one main site. It works, BUT it lists ALL the products - even the ones from the second multi-stores site. I want it to show products from ONLY the main store.

 

So I tried adjusting the sql calls and have got it 'half working'. I dont understand the 'join' bits too well so I am not sure if i am adding the multi-sites bit properly.

 

Original allprod.php page is listed below. I have marked the chages I made for multistores.

Would appreciate an expert opinion to correct any mistakes.

 

 

 

 <?php 
require('includes/application_top.php'); 
include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ALLPRODS); 

$breadcrumb->add(HEADING_TITLE, tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL')); 

$firstletter=$HTTP_GET_VARS['fl'];
if (!$HTTP_GET_VARS['page']){
 $where="where pd.products_name like '$firstletter%'";
}else {
 $where="where pd.products_name like '$firstletter%'";
} 


?> 
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html <?php echo HTML_PARAMS; ?>> 
<head> 
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.55 
// Replaced by header_tags.php 
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { 
 require(DIR_WS_INCLUDES . 'header_tags.php'); 
} else { 
?> 
 <title><?php echo TITLE ?></title> 
<?php 
} 
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?> 
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> 
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head> 
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> 
<!-- header //--> 
<?php require(DIR_WS_INCLUDES . 'header.php'); ?> 

<!-- header_eof //--> 

<!-- body //--> 
<table border="0" width="100%" cellspacing="3" cellpadding="3"> 
<tr> 
  <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> 
<!-- left_navigation //--> 
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> 
<!-- left_navigation_eof //--> 
  </table></td> 
<!-- body_text //--> 
  <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
	  <?php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {?> 
	   <td><h1><?php echo HEADING_TITLE; ?></h1></td>
	  <?php } else { ?>		   
	   <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
	  <?php } ?>
	   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	 </tr>
	 <tr>
	   <td class="main"><?php echo HEADING_SUB_TEXT; ?></td>
	 </tr>		   
	 <tr>
	  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	 </tr>
   </table></td>
 </tr>
 <tr>
   <td align="center" class="smallText"><?php $firstletter_nav=
	'<a href="' . tep_href_link("allprods.php",  'fl=A', 'NONSSL') . '"> A |</A>' . 
	'<a href="' . tep_href_link("allprods.php",  'fl=B', 'NONSSL') . '"> B |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=C', 'NONSSL') . '"> C |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=D', 'NONSSL') . '"> D |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=E', 'NONSSL') . '"> E |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=F', 'NONSSL') . '"> F |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=G', 'NONSSL') . '"> G |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=H', 'NONSSL') . '"> H |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=I', 'NONSSL') . '"> I |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=J', 'NONSSL') . '"> J |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=K', 'NONSSL') . '"> K |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=L', 'NONSSL') . '"> L |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=M', 'NONSSL') . '"> M |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=N', 'NONSSL') . '"> N |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=O', 'NONSSL') . '"> O |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=P', 'NONSSL') . '"> P |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Q', 'NONSSL') . '"> Q |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=R', 'NONSSL') . '"> R |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=S', 'NONSSL') . '"> S |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=T', 'NONSSL') . '"> T |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=U', 'NONSSL') . '"> U |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=V', 'NONSSL') . '"> V |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=W', 'NONSSL') . '"> W |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=X', 'NONSSL') . '"> X |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Y', 'NONSSL') . '"> Y |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A>??'   .
	'<a href="' . tep_href_link("allprods.php",  '',	 'NONSSL') . '"> FULL</A>';

	echo $firstletter_nav; ?></td>
 </tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
 <tr>
   <td>
<?php
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
				  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
				  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 
				  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
				  'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
				  'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
				  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
				  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
asort($define_list);

$column_list = array();
reset($define_list);
while (list($column, $value) = each($define_list)) {
  if ($value) $column_list[] = $column; 
}

$select_column_list = '';

for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
  if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_NAME') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
 continue;
  }
}  
//  CHANGED THIS PART FOR MULTISTORES
/*  THIS WAS THE ORIGINAL
$listing_sql = "select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id  $where order by pd.products_name";
*/

// BOF MULTIISTORES CHANGE
$listing_sql = "select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id and s.stores_id = '" . STORES_ID . "',  " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p2s.stores_id = '" . STORES_ID . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id order by pd.products_name";
// EOF MULTISTORES CHANGE

if (ALL_PRODUCTS_DISPLAY_MODE == 'true')
include(DIR_WS_MODULES . 'product_listing.php'); //display in standard format
else
include(DIR_WS_MODULES . 'allprods.php');
?>
   </td>
 </tr>
  </table></td>
<!-- body_text_eof //-->
  <td width="<?php //echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php //echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php //require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
  </table></td>
</tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

The ALLPRODUCTS page seems to work. BUT i am sure there are errors somewhere. It does call products from main site . BUT the A-Z links are not working. I'm sure its just the database call which is the problem.

 

Any help on this would be appreciated.

 

Many thanks

Link to comment
Share on other sites

Hi people,

 

i'm looking for a method to hide products zu a group of customers - but i find out that it might be better using this multi-store contrib.

 

only thin that is making me nervous is that customers can log in to any of the shop's using their registration of one shop.

 

so i need a method to diable this in this contrib.

 

the contrib should use for every shop a own customer table,...

 

is this posible?

 

thanks for the help!

 

burroz

Link to comment
Share on other sites

This contribution looks great and I tried to go through many of the posts to find the answers but was unclear on a couple things. All responses are appreciated.

a. Can each store have payment options ie different merchant accounts ie we use trustcommerce for one store and paypal payments pro for the other

b. I also stumbled upon the Virtual Mall Contribution and the Multiple "Mini-Stores" with 1 Admin contribution but could not find any comparisons. This one has the longest support board which probably means more people use it but i was just looking to see if there is a glaring difference between the two in terms of the desired functionality ie. why would one choose the virtual mall over this.

 

Thanks in advance,

SF

Link to comment
Share on other sites

Hobzilla.

Is there a way to add the STS Template contribution together with you Multi-Store contribution. I have been fiddling with it all evening and have had no luck. Please send me a message to let me know if you would be willing to help me make it work. I will pay you for your time.

 

Thanks.

Aaron

Link to comment
Share on other sites

Hobzilla.

Is there a way to add the STS Template contribution together with you Multi-Store contribution. I have been fiddling with it all evening and have had no luck. Please send me a message to let me know if you would be willing to help me make it work. I will pay you for your time.

 

Thanks.

Aaron

 

 

I'm using the STS Plus system and have no problems with the integration.... the STS Plus system allows you to select from a variety of templates right from the Admin. Hope this helps.

Link to comment
Share on other sites

I am looking for a live shop to see this contribution in action. I am not positive it is what I am looking for and am not willing to mod my site just to have to undo it all if it's not. Can SOMEONE, ANYONE pls post a link or something to a site that has this contribution in place...there are 45 pages of posts in this thread and I have not been able to find ONE that has an example.

 

 

PLEASE!!!!

Link to comment
Share on other sites

Hi There.

 

i'm sure i'm not far from the answer but i just can't find out how to run it correctly.

what i've done :

1- install osc 2.2 in /directory1/

2- install M-S v1.8 over /directory1/

3- Run update.sql

4- Create New Store via the admin

5- copy /directory1/ to

/directory2/ and

/directory3/

6- edit and set configure.php in

directory2/includes & directory2/admin/includes

directory3/includes & directory3/admin/includes

 

Here my first steps. after that my 3 stores ran but not correclty.

All categories and products were displayed in the main shop, and in the others shops.

Also, i couldn't upload pictures in my admin panel even if my /images/ folder was CHMOD to 777

 

And in answer to my own earlier question, I had omitted changing the database_tables.php file in the second store, or inserting the default configuration values for the second store via MySQL.

 

Vger

 

Then i found that in the forum so :

7- edit and configure database_tables.php in

directory2/includes

directory3/includes

 

Then here what happen :

1- Admin panel work but i still can't upload pictures...

2- on the 3 index of the shops here what i have (where directoryX=directory1, directory2 etc..):

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/opt/php/lib/php') in /home/www/***/web/directoryX/includes/application_top.php on line 289

 

So, if you could help me with this problem and my pictures upload problem

i will thanks you and kiss you on your butt ^_^

 

Thanks in advance

and good job.

Link to comment
Share on other sites

Then here what happen :

1- Admin panel work but i still can't upload pictures...

2- on the 3 index of the shops here what i have (where directoryX=directory1, directory2 etc..):

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/opt/php/lib/php') in /home/www/***/web/directoryX/includes/application_top.php on line 289

 

so,

i change the code on the 289 line and replace $language by french (my language)

then i had another error pointed on the index.php of the site which was looking for the language file into :

includes/languages//index.php

so i replace $language by french

and then the site run

but i still can't see my categories in my others shop

and see all my categories in the main one even if they are not set to be displayed on it.

and still can't upload pictures...

Link to comment
Share on other sites

I am looking for a live shop to see this contribution in action. I am not positive it is what I am looking for and am not willing to mod my site just to have to undo it all if it's not. Can SOMEONE, ANYONE pls post a link or something to a site that has this contribution in place...there are 45 pages of posts in this thread and I have not been able to find ONE that has an example.

PLEASE!!!!

 

you can see mine

http://herasonlinemarket.com/catalog

 

and

http://books4u2.com

 

both stores have the same admin

noppie

Link to comment
Share on other sites

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! HOW TO INSTALL THE MULTI-STORE V1.8 WITH OSC 2.2M !!!!!!!!!
!!! PLEASE REMEMBER TO BACKUP YOUR FILES !!!!!!!!!!!!!!!!!!!!!! 
!!! THIS IS FOR A NEW INSTALL ONLY !!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! By SambaMambo - Avril 2006 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Step 1-Combine all the files from multi-store v1.8 with a base version of osCommerce MS2.2. Do this before uploading any files to the server. it will simplify and speed up the installation for all stores.
You can also create a package for the second and others stores without the /admin/ /images/ /install/ folders as they aren't requested for the installation.

Step 2-You must not delete the update.sql (multi-store v1.8) file, you will need to run this file from your SQL page later.

Step 3-Upload the store package that was completed in step 1 into /shop1/ /shop2/ /shop3/ etc... directories
You have one admin panel and one image folder for all stores. 
Also when you upload a picture from the admin panel to a product, it will automatically upload it to the /shop1/images/ directory

Step 4-Once the upload is finished CHMOD the following files to 706 or 777; 
/shop1/includes/configure.php 
/shop1/admin/includes/configure.php 

But only for the /shop1/ files !!!

Step 5-Go to the store URL in your browser and follow the install instructions.
(http://yourdomain.com/shop1/)
It is recommended to use the database sessions instead of the file sessions option with multiple store contribution. 
(During the install, you will be asked to choose between session files or database)
If you are using file based sessions (selected during install), you will need to uncomment the define 
in admin/includes/application_top.php around line 69.

Step 6-When you arrive at the last install screen that has the catalog and administration buttons, import the update.sql (multi-store v1.8) file to your SQL base you choose to install the shop. Do not close the install screen !!!

Step 7-Log on to the store admin through the install screen 
Login : admin (default login)
Pswd : admin (default pswd)
and create a second store in Admin/Stores/ page.
You can call the configuration file configuration_shop2 and check ?Insert default configuration table?? box.
This will create a configuration_shop2 Table into your SQL Database. 

Step 8-Set the language to the default language for both stores. you can add languages later, this simplifies any troubleshooting if needed. 
in Admin/Localization/Languages click on the language and you will see on the right column a button (or not, i didnt have one...) called "Store". Click on it and you will have the cases to enable the language or not for each stores you created. Do not forget to do it again if you add more stores.

Step 9-Go to the Admin/category/products page and select a category for each store. Also check the ?Enable/Disable store to ALL sub-categories and sub-products? 
When you click on the categorie you have on the right column a button (or not...) called "Store" which is used to enable or not the categories for each stores.

Step 10-Go to Admin/Configuration/Multi-Stores and define the WS & FS paths for the shop1 only!!!
(you have a case in the right panel where you can choose between your differents stores.)
BECAREFULL !!! What is called Store Catalog Filesystem Languages Path, Store Catalog Filesystem Images Path, Store Catalog Filesystem Modules Path are the ADMIN Pathes.

Store Catalog Website URL				:	http://yourdomain.com 	 	 
Store Catalog Website SSL URL			: 	https//yourdomain.com	 
Enable SSL Store Catalog 				:	false or true	 
Store Catalog Website Path 		 		:	http://yourdomain.com/shop1/
Store Catalog Filesystem Path 			:	/home/www/account/web/shop1/ (for example)
Store Catalog Website Images Path 		:	http://yourdomain.com/shop1/images 
Store Catalog Website Languages Path 	:	http://yourdomain.com/shop1/includes/languages/	 
Store Catalog Filesystem Languages Path :	/home/www/account/web/shop1/admin/includes/languages/		 
Store Catalog Filesystem Images Path 	:	/home/www/account/web/shop1/admin/images/	
Store Catalog Filesystem Modules Path	:	/home/www/account/web/shop1/admin/includes/modules/

Step 11-Test out the default store to see if it's working. 
If everything looks good, go back and start filling out the configuration screens for the default store and rename the default store (shop1) in the stores admin page.
in /Admin/configuration/My Store/
Keep the name "configuration" for this Table.
When you create a new one, call it configuration_shop2 or configuration_dvd for example. it will be more easy for you to find it back into your SQL Database if you need to change things... who knows?

Step 12-Creating a new store
Edit the shop2/includes/configure.php file in the /shop2/ to reflect the new store absolute file path and web paths

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.yourdomain.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure? false or true
 define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/shop2/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/shop2/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/www/account/web/shop2/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'login');
 define('DB_SERVER_PASSWORD', 'pswd');
 define('DB_DATABASE', 'SQLBaseName');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Step 13-Edit the shop2/includes/database_tables.php 
change 
define(?TABLE_CONFIGURATION?, ?configuration?); 
to 
define(?TABLE_CONFIGURATION?, ?configuration_shop2?); (the name of your Table you've created when add the new store)

Step 14-Go to Admin/Configuration/Multi-Stores and define the WS & FS paths for the shop2
(you have a case in the right panel where you can choose between your differents stores.)

Store Catalog Website URL				:	http://yourdomain.com 	 	 
Store Catalog Website SSL URL			: 	https//yourdomain.com	 
Enable SSL Store Catalog 				:	false or true	 
Store Catalog Website Path 		 		:	http://yourdomain.com/shop2/
Store Catalog Filesystem Path 			:	/home/www/account/web/shop2/ (for example)
Store Catalog Website Images Path 		:	http://yourdomain.com/shop1/images 
Store Catalog Website Languages Path 	:	http://yourdomain.com/shop1/includes/languages/	 
Store Catalog Filesystem Languages Path :	/home/www/account/web/shop1/admin/includes/languages/		 
Store Catalog Filesystem Images Path 	:	/home/www/account/web/shop1/admin/images/	
Store Catalog Filesystem Modules Path	:	/home/www/account/web/shop1/admin/includes/modules/

As you see you have the same images, languages and admin folders as the /shop1/ settings.

Step 15-Test out the second store to see if the categories and products appear. If they do, you've done it! 

Step 16-Delete the install directory. 
/shop1/install/
Delete the install and admin directory of your shop2/ shop3/ etc... if you didnt do it before.

Step 17-Make sure that files and directories permissions are set properly

CHMOD the following directories permissions:

shop1/images => 777 read/write/execute?INCLUDE SUBDIRECTORIES
shop1/pub => 777 read/write/execute 
shop1/admin/backups => 777 read/write/execute  
shop1/admin/images/graphs => 777 read/write/execute

CHMOD the following file permissions;

catalog/includes/configure.php =>  604 read 
catalog/admin/includes/configure.php => 604 read

----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------

 

:D :P :sweating:

 

Ok guys, it's done!

Now repeat the steps each time you want to add another stores and everything will work fine.

You can easily import your Backup Base into the new one. just put the "Alter Code" instead of "IF EXIST REPLACE" in your SQL request.

 

Also as it is said, you can add most of the add-ons for oscommerce for this contribution. Just don't forget to make the change for each stores if necessary.

So this contribution allow you to have a multi-store with a unique database, only one admin panel, and you can easily make 2 or 3 differents design for each store and add contrib for only of them and allow one of them to only a group of members etc...

it's really awesome! Only the install files are not really clear.

 

i can't believed it... i fought for 1 month to make it run... yeah i took my time but in general i make a complete site in 2 days max... as i hate script i can't set properly in the hour... damn me!

I've take the "How To install Multi-Store v1.7" By Greg and change it a little bit and add some more explanations. Also, WE don't need to pay to have a How-To about a FREE PHP Script ... Sorry Greg.

i couldn't find any clear set up so i decided to do it as it is so simple in reality ... and in regard of that Thread we can see that many peeps have troubles to install it.

 

I hope it will help you all.

 

Thanks to Ryan Hobbs/Hobbzilla for this uge and awesome contrib!

Contribution : http://www.oscommerce.com/community/contri...rch,multi-store

Forum Support : http://www.oscommerce.com/forums/index.php?sho...ic=70365&st=880

 

Thanks to Greg for his helpfull site where i get the most explicit how-to!

http://www.testoscommerce.com/

 

Thanks to Fx0d who forced me to install it at 2.30 am and get it working ...

Link to comment
Share on other sites

you can see mine

http://herasonlinemarket.com/catalog

 

and

http://books4u2.com

 

both stores have the same admin

noppie

 

Thank you so much for those links, I'm wondering now though if anyone knows of a contribution where I can have two stores on one site....here's why, I use dropshippers for my jewelry site, and I have one which is based in New Mexico so I have that all set up...now I want to add some product from another drop shipper who is based in Washington. Obviously if a customer orders some product from one drop shipper and some from the other I need to charge them shipping for the products they ordered from each place.....is this doable do anyone know?

Link to comment
Share on other sites

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! HOW TO INSTALL THE MULTI-STORE V1.8 WITH OSC 2.2M !!!!!!!!!

!!! PLEASE REMEMBER TO BACKUP YOUR FILES !!!!!!!!!!!!!!!!!!!!!!

!!! THIS IS FOR A NEW INSTALL ONLY !!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! By SambaMambo - Avril 2006 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

I fogert to mention that you have to change the file configure.php of each new store.

/shop2/includes/configure.php

  define('DIR_WS_IMAGES', '../shop1/images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . '../shop1/icons/');

 

to set the image folder as the first shop.

Link to comment
Share on other sites

...

Gift Voucher/Credit mod: If you decide to add this, perhaps set up as a general option so vouchers can be used across the stores AND set an option so that stores can have their own vouchers.

 

With that concept in mind...perhaps fix the shopping cart so that it can do something similar, cart cross store usable unless for specific stores.

 

Shipping & Payment options same idea.

 

As for CCVG, I will not be "adding" other contribs into this one.. I have done that before (along with other contributions).. it was taken off of oscommerce, I was banned from the forums (twice). Therefore I won't be adding anything to the M-S code... however someone is welcome to extract it, modify it, make it work, etc. and resubmit the CCVG for M-S as an independent M-S contribution.

 

Payment & Shipping & Order Total modules are store independant. You should be able to do that now.

Link to comment
Share on other sites

Hi hobbzilla!

 

First of all, thank you for your great contribution! It is the perfect solution for my actual oscommerce-project.

 

Like you have written in your answer above, only the main admin can add top level categories. Now my question. Is it possible to change the code, that every admin can add top level categories?

 

I tried to change that in catalog/admin/categories.php

But unfortunately without success :(

 

If you have a hint for me how i can solve that problem, i would be very thankful!!

 

greetings

 

Look for any code in the /admin/categories.php

 

$login_id == '1'

 

That's the key for the "Super Admin" You can always add to it with || (OR's) or you could also create a new field for the table called "super_admin" and mark the admins "1" for and "0" for NOT and modify the code to use a $super_admin == '1' instead of by administrator's id key.

Link to comment
Share on other sites

Hi people,

 

i'm looking for a method to hide products zu a group of customers - but i find out that it might be better using this multi-store contrib.

 

only thin that is making me nervous is that customers can log in to any of the shop's using their registration of one shop.

 

so i need a method to diable this in this contrib.

 

the contrib should use for every shop a own customer table,...

 

is this posible?

 

thanks for the help!

 

burroz

 

M-S will not do this for you sorry.. With some programming anything is possible. I don't know if I would go the route of different stores for customer_groups.. I would just modify the code to utilize the customer_groups instead of the stores.. I.e. products_to_customer_groups instead of products_to_stores. Again, this would require some work..

Link to comment
Share on other sites

I am looking for a live shop to see this contribution in action. I am not positive it is what I am looking for and am not willing to mod my site just to have to undo it all if it's not. Can SOMEONE, ANYONE pls post a link or something to a site that has this contribution in place...there are 45 pages of posts in this thread and I have not been able to find ONE that has an example.

PLEASE!!!!

 

 

Perhaps a better solution would be for me to get a site that people could use in a TEST store.. I don't know how much store owners would appreciate people creating accounts and testing stuff in a production store.. But here is a few examples of some stores that run this

 

http://www.reversion.com/

http://www.softandsmooth.com/

http://www.theraderm.net/

http://www.extremeskin.com/

 

all off of the same osCommerce database.

 

Please note, these are LIVE sites.

Link to comment
Share on other sites

Perhaps a better solution would be for me to get a site that people could use in a TEST store.. I don't know how much store owners would appreciate people creating accounts and testing stuff in a production store.. But here is a few examples of some stores that run this

 

http://www.reversion.com/

http://www.softandsmooth.com/

http://www.theraderm.net/

http://www.extremeskin.com/

 

all off of the same osCommerce database.

 

Please note, these are LIVE sites.

 

Thank you Hobbzilla, but I guess what I'm looking for is to have only one site with two stores on it...and I'm wondering if this will work. This site has something like I want and I'm wondering if this contribution will allow me to do this.

 

Importer Mall

Link to comment
Share on other sites

Hi There.

 

i'm sure i'm not far from the answer but i just can't find out how to run it correctly.

what i've done :

1- install osc 2.2 in /directory1/

2- install M-S v1.8 over /directory1/

3- Run update.sql

4- Create New Store via the admin

5- copy /directory1/ to

/directory2/ and

/directory3/

6- edit and set configure.php in

directory2/includes & directory2/admin/includes

directory3/includes & directory3/admin/includes

 

Here my first steps. after that my 3 stores ran but not correclty.

All categories and products were displayed in the main shop, and in the others shops.

Also, i couldn't upload pictures in my admin panel even if my /images/ folder was CHMOD to 777

Then i found that in the forum so :

7- edit and configure database_tables.php in

directory2/includes

directory3/includes

 

Then here what happen :

1- Admin panel work but i still can't upload pictures...

2- on the 3 index of the shops here what i have (where directoryX=directory1, directory2 etc..):

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/www/***/web/directoryX/includes/application_top.php on line 289

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/opt/php/lib/php') in /home/www/***/web/directoryX/includes/application_top.php on line 289

 

So, if you could help me with this problem and my pictures upload problem

i will thanks you and kiss you on your butt ^_^

 

Thanks in advance

and good job.

 

 

It appears that you have a common issue. 1st, if you want to upload images to each separate store with the admin, you will need to make sure that you have the correct permissions for the server.. most shared hosting servers do not let you upload things to another account's directory! :) there is a php basedir restriction that you may have to deal with along with the account permissions as well.

 

If you are all under the same directory i.e. /store1 /store2 /store3 and you have a /admin this should work find.. but you may need to double check that your store configuration database has the admin settings (this is in the configuration->Multi-Stores Settings portion of the admin and then removed in the actual /admin/includes/configure.php file

 

Also, the hard linking of store images directories may be of use to a default store image directory... there is some information about this in the installation file.

Link to comment
Share on other sites

Thank you Hobbzilla, but I guess what I'm looking for is to have only one site with two stores on it...and I'm wondering if this will work. This site has something like I want and I'm wondering if this contribution will allow me to do this.

 

Importer Mall

 

You can always have one site : http://www.yourstore.com/

 

with multiple stores within that site:

 

http://www.yourstore.com/store1

http://www.yourstore.com/store2

 

Does that work?

Link to comment
Share on other sites

(noppie @ Apr 17 2006, 05:35 PM) *

 

you can see mine

http://herasonlinemarket.com/catalog

 

and

http://books4u2.com

 

both stores have the same admin

noppie{/quote]

Thank you so much for those links, I'm wondering now though if anyone knows of a contribution where I can have two stores on one site....here's why, I use dropshippers for my jewelry site, and I have one which is based in New Mexico so I have that all set up...now I want to add some product from another drop shipper who is based in Washington. Obviously if a customer orders some product from one drop shipper and some from the other I need to charge them shipping for the

products they ordered from each place.....is this doable do anyone know?

 

You could always use individual shipping costs. Individual Product Shipping Prices

That is what I use in one of my stores.

then you can seperate shipping for each items

noppie

Link to comment
Share on other sites

You could always use individual shipping costs. Individual Product Shipping Prices

That is what I use in one of my stores.

then you can seperate shipping for each items

noppie

 

 

Or perhaps you may want to look into MVS V1.0 (Multi Vendor Shipping):

 

http://www.oscommerce.com/community/contributions,4129

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...