Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi-Stores Multiple Shops Support


hobbzilla

Recommended Posts

Ok, how do I execute it. I called it up but it came up as a text file and nothing happened. Am I supposed to put it in a certain folder, have certain permission settings, etc.

 

In other apps I have ran, they automatically updated and I assumed this would as well. Please be specific for me. Thank you!

Link to comment
Share on other sites

I got the multi store installed. I set config setup for second store, but when submitted error top of screen said "no file uploaded" - and now it says there is no config file created for the second store. What do I do to allow it to upload?

Link to comment
Share on other sites

  • 2 weeks later...

Would anyone know if it is possible to modify admin/define_language.php in that way so if a user that is assigned to one specific sub-store could update the language files for his store?

 

I think I might know how to do it, but could the language files be updated if admin is on one url and the subshops is on another url?

 

// Fredrik

Link to comment
Share on other sites

I just did a fresh install of oscommerce, and multi stores.

 

In the admin section.. When I hit administrators I get the following error:

 

Parse error: parse error, unexpected '}' in C:\htdocs\cat1\admin\administrators.php on line 535

 

When I remove the } The page loads, but I get this text outputed where the admins should be:

 

administrators_id) ) { echo ' ' . "\n"; } else { echo ' ' . "\n"; } ?>

 

I just copied over the file from 1.7..

 

Any Ideas? Thanks!

Link to comment
Share on other sites

Hello.

 

First of all, great contribution.

 

Was just wondering: how do we go about installing mods / contributions on all the stores? Do we install it in the first shop, then just copy all the catalog files to the succeeding shops? Do we even need to copy the admin files to the second shop ( I tried NOT copying the admin files and the second shop seemed to be working fine, but just wanted to make sure)?

 

I was just wondering because I dont know how to go about installing the payment and shipment modules.

 

Thanks!

Link to comment
Share on other sites

Is Multi-Stores compatible with mysql 5??? I am getting on a clean install errors left right and center on example been

 

they all seem to vary slightly from this

 

1054 - Unknown column 'p.products_id' in 'on clause'

select distinct p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s.stores_id = '1', s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id and s.stores_id = '1', products_to_categories p2c, categories c INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '3' and p.products_status = '1' order by p.products_date_added desc limit 9

 

 

Do the suggestions on the link below need to be adjusted for use with Multi-Stores? I have am using MYSQL 5.0.15 and Im not really able to downgrade it due to other website requirements...

 

http://www.oscommerce.com/community/bugs,3...&+Configuration

Link to comment
Share on other sites

Is Multi-Stores compatible with mysql 5??? I am getting on a clean install errors left right and center on example been

 

they all seem to vary slightly from this

Do the suggestions on the link below need to be adjusted for use with Multi-Stores? I have am using MYSQL 5.0.15 and Im not really able to downgrade it due to other website requirements...

 

http://www.oscommerce.com/community/bugs,3...&+Configuration

 

It looks like your table doesn't have a products_id column, which is strange since that should be the primary key. Do:

 

DESC products;

 

And make sure the products_id column exists. It shouldn't have anything to do with MySQL 5.

osCommerce is a great piece of software with wonderful contributions.

Spend some time in the contribution area. There are a lot of gems there.

Link to comment
Share on other sites

I'm running the multi shop feature, integrated with my paypal business premier account. Things are working properly for me right now, except for the following. What I want to do is be able to shorten the paypal checkout process, by having one page that has the shipping and billing information on it versus two pages. This shortens the whole process a little bit. The problem that we're having is that since it's a multi store, the main site is fine, but the other store is getting all messed up. Has anyone succesfully completed this? or have suggestions?

 

Thanks,

Link to comment
Share on other sites

Hi Guys,

 

I am trying to implement the categories on main page contrib with the multi stores, the basic install of categories on main page grabs all categories from the dbase and obviously not just the ones that are assigned to the specific store through multi stores.

 

I could really do with a little help as I am quite stuck in figuring this out. I hate posting long pieces of code in a post but I dont see any other way this time.

 

If anyone has any ideas on what I need to do to this code to make it multi stores complient I would really appreciate it.

 

Categories on Main Page code:

 

// error checking on parameters
if($item_column_number < 1)
{
$item_column_number = 1;
}
if($item_column_number > 9)
{
$item_column_number = 9;
}
if($item_title_on_newline)
{
$item_separator = '<br>';
} else {
$item_separator = ' ';
}

// Preorder tree traversal
 function preorder($cid, $level, $foo, $cpath)
 {
global $categories_string, $HTTP_GET_VARS;

// Display link
if ($cid != 0) {
  for ($i=0; $i<$level; $i++)
	$categories_string .=  '  ';
  $categories_string .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath
=' . $cpath . $cid) . '">';
// 1.6 Are we on the "path" to selected category?
  $bold = strstr($HTTP_GET_VARS['cPath'], $cpath . $cid . '_') || $HTTP_GET_VARS['cPath'] == $cpath . $cid;
// 1.6 If yes, use <b>
  if ($bold)
	$categories_string .=  '<b>';
  $categories_string .=  $foo[$cid]['name'];
  if ($bold)
	$categories_string .=  '</b>';
  $categories_string .=  '</a>';
// 1.4 SHOW_COUNTS is 'true' or 'false', not true or false
  if (SHOW_COUNTS == 'false') {
	$products_in_category = tep_count_products_in_category($cid);
	if ($products_in_category > 0) {
	  $categories_string .= ' (' . $products_in_category . ')';
	}
  }
  $categories_string .= '<br>';
}

// Traverse category tree
if (is_array($foo)) {
  foreach ($foo as $key => $value) {
	if ($foo[$key]['parent'] == $cid) {
	  preorder($key, $level+1, $foo, ($level != 0 ? $cpath . $cid . '_' : ''));
	}
  }
}
 }

?>
<!-- main_categories //-->
	  <tr>
		<td>
<?php
//////////
// Display box heading
//////////
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left', 'text'  => BOX_HEADING_CATEGORIES);
 //new infoBoxHeading($info_box_contents, false, false);


//////////
// Get categories list
//////////
// 1.2 Test for presence of status field for compatibility with older versions
 $status = tep_db_num_rows(tep_db_query('describe categories status'));

 $query = "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image
		from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION .
" cd
		where c.categories_id = cd.categories_id";
// 1.3 Can't have 'where' in an if statement!
 if ($status >0)
$query.= " and c.status = '1'";
 $query.= " and cd.language_id='" . $languages_id ."'
		order by sort_order, cd.categories_name";

 $categories_query = tep_db_query($query);


// Initiate tree traverse
$categories_string = '';
preorder(0, 0, $foo, '');

//////////
// Display box contents
//////////

$info_box_contents = array();

$row = 0;
$col = 0;
while ($categories = tep_db_fetch_array($categories_query))
{
if ($categories['parent_id'] == 0)
  	{
  		$cPath_new = tep_get_path($categories['categories_id']);
/*"OMITED SO IT DOESNT DISPLAY SUBCATEGORIES"	$text_subcategories = '';
	$subcategories_query = tep_db_query($query);
	while ($subcategories = tep_db_fetch_array($subcategories_query))*/
	{
 		if ($subcategories['parent_id'] == $categories['categories_id'])
			{
			$cPath_new_sub = "cPath="  . $categories['categories_id']/*"OMITED SO IT DOESNT DISPLAY SUBCATEGORIES" . "_" . $subcategories['categories_id']*/;
			$text_subcategories .= '? <a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new_sub, 'NONSSL') . '">';
			$text_subcategories .= $subcategories['categories_name'] . '</a>' . " ";

		} // if ($subcategories['parent_id'] == $categories['categories_id'])

	} // while ($subcategories = tep_db_fetch_array($subcategories_query))

if ($hover == 'on')
{

	$info_box_contents[$row][$col] = array('align' => 'left',
									   'params' => 'class="smallText" style="border:' . $borderwidth . 'px solid ' . $regborder . '" onMouseOver="window.status=\'' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '\'; this.style.backgroundColor=\'' . $hovercolor . '\'; this.style.cursor=\'hand\'; this.style.border=\'' . $borderwidth . 'px solid ' . $hoverborder . '\';" onMouseOut="window.status=\'\'; this.style.backgroundColor=\'' . $regcolor . '\'; this.style.border=\'' . $borderwidth . 'px solid ' . $regborder . '\';" onclick="location.href=\'' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '\'" width="'.intval(100/$item_column_number).'%" valign="' . $valign . '"',
									   'text' => '<div '. $item_div_options . '><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' .  tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>' . $item_separator . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . $categories['categories_name'] . '</a><DIV ' . $item_subcategories_options . '>' . $text_subcategories . $spacing . '</DIV></DIV>');

}

else

{

	$info_box_contents[$row][$col] = array('align' => 'left',
									   'params' => 'class="smallText" width="'.intval(100/$item_column_number).'%" valign="' . $valign . '"',
									   'text' => '<div '. $item_div_options . '><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' .  tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>' . $item_separator . '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . $categories['categories_name'] . '</a><DIV ' . $item_subcategories_options . '>' . $text_subcategories . '</DIV></DIV>');

}

	// determine the column position to see if we need to go to a new row
	$col ++;
	if ($col > ($item_column_number - 1))
	{
:blink:	   		$col = 0;
		  $row ++;

	} //if ($col > ($number_of_columns - 1))

} //if ($categories['parent_id'] == 0)

} // while ($categories = tep_db_fetch_array($categories_query))

//output the contents
new contentBox($info_box_contents);

 

Thanks

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hello.

 

First of all, great contribution.

 

Was just wondering: how do we go about installing mods / contributions on all the stores? Do we install it in the first shop, then just copy all the catalog files to the succeeding shops? Do we even need to copy the admin files to the second shop ( I tried NOT copying the admin files and the second shop seemed to be working fine, but just wanted to make sure)?

 

I was just wondering because I dont know how to go about installing the payment and shipment modules.

 

Thanks!

 

First of all, I'm not dead as some of the rumors may suggest. Secondly, I apologize that I have not had the time to support this contribution.. luckily (??) the oscommerce current version is still Milestone 2. Therefore, not much has needed to be changed with this code. Since this code was mainly driven by the needs of my former employeer who operated several online sites, I have not been active after taking a new position with a company that does not do ecommerce. However, this is changing as I am going to be opening my own online store with 2 other partners to try and make some money. The concept looks very promising so hopefully it will take off -- keeping this contrib up-to-date and supported.

 

To answer your question - the easiest thing to do would be to create a localized installation of this codebase and if you are using a *nix host, create hard and/or soft links in order to keep the other shops current. If not, you will have to copy over the code into the other stores in order for them to stay updated. This is one reason that a template would be very nice. Keeping the code separate from the content would make life so much easier when it comes to running multiple shops from a single source. This goes for the catalog section. For the admin section, you really only need one installation of that as you should be able to configure all stores from one admin.

Link to comment
Share on other sites

Does anyone has any success integrating multi store with salemaker.

 

I try to install salemaker over multi store. when i create a salemaker, it shows in the product new but not in product info.

 

Anyone has any idea.

 

To see what I meant, please goto

 

http://www.sarahgifts.com/backoffice/

 

Thank you.

Link to comment
Share on other sites

Hello Ryan,

 

Very nice contribution, Thank you.

 

New Install:

When attempting to access admin at: www.mydomain.com/catmain/admin/index.php

the browser loads the following page: www.mydomain.com/catmain/admin/login.php?in_login=yes&retpage=

 

 

Using an incorrect UN and PW it kicks me back to login with the wrong UN/PW error message which is good, however when I attempt to login with the correct (default) UN=admin, PW=admin at the login FireFox loads the following a new page and message: Object Moved This document may be found ?here?. Clicking ?here? takes me back to login.

 

 

After I get the above error on page load? If I take the url from the loaded page:

www.mydomain.com/catmain/admin/login.php?in_login=yes&retpage=

and modify the url to:

www.mydomain.com/catmain/admin/index.php

I am logged in and have full access.

 

 

My (non-programmer) assumption is that when the returnpage is loaded perhaps it goes to the wrong file location to load the index page... I'm not certain.

 

 

I can work around this by modifying the url whenever after login and get the "Object Moved" message, but do you have a suggestion to have login pagereturn load the correct page eliminating the ?Object Moved? message?

 

 

Thanks in advance.

Link to comment
Share on other sites

when I attempt to login with the correct (default) UN=admin, PW=admin at the login FireFox loads the following a new page and message: Object Moved This document may be found ?here?. Clicking ?here? takes me back to login.

 

 

The url that is loaded with this meassage:

url=www.mydomain.com/catmain/admin/login.php

Edited by Bighawk
Link to comment
Share on other sites

Hello Ryan,

 

I have not found where to setup the currency default for each store.

 

For example I would like to have the following currency defaults;

Store #1: USA

Store #2: Canadian

Store #3: Euro

 

More than likely I have missed something?

Please provide a little insight on how to configure this.

 

Thanks in advance.

Link to comment
Share on other sites

The Case Of The Missing Right Column & Footer

 

Currently I only have two products setup for the store (mice).

 

When laoded in my browser(s) the catalog/index.php page right column and footer are missing.

url= http://www.bighawk.net/catalog/index.php

 

When I select the category ?Hardware? the right column and footer load fine.

url= http://www.bighawk.net/catalog/index.php?cPath=1

 

When I select ?Hardware/Mice? the right column and footer load fine.

url= http://www.bighawk.net/catalog/index.php?cPath=1_9

 

I haven?t yet fully tested the Multi-Stores contribution but as far as I can tell the right column and footer load everywhere except the main index.php page.

 

I don?t understand why index.php doesn?t load the right column and footer while index.php?cPath=1 or ndex.php?cPath=1_9 do? in all cases I am still viewing variations of index.php

 

 

Is there someone able and willing to provide me with some guidance to rectify the missing right column and footer?

Edited by Bighawk
Link to comment
Share on other sites

I have been running several MultiStore1.7 stores for a while now(14 as of now and more to come) and it has worked great for us. I have been having an intermittent problem where a store will, on rare occassion, send an email confirmation from another store, although when I look in the orders module in the admin the proper store shows up fine for that order which tells me there is a bug in the checkout_process somewhere.

 

Initially we were on shared hosting but a month or two ago we got a dedicated machine at our host. The problem has occurred on both servers(BAMP).

 

I get alot of 'we have a problem with this,' but no one ever bothers to give me the details about which stores this is happening with. My guess is it hasnt happened more than 10 times in almost a year since the first store went live.

 

I do know the facts with two different instances of this problem for sure though. Store 10 sent a confirmation from store 5 and store 6 sent a confirmation from store 3. This might suggest that the store_id might be getting divided by 2 somehow before the store_name gets queried, but I cant state that as fact in all instances of this problem since our fullfillment people have ususally just told me there was a problem, not the details of it.

 

Has anyone else had this problem? I grazed through some of this thread and did some searches but did not find anything.

 

TIA

Matt

Matt Mika

Installed Contributions: Multi-Stores, QTPro, CCGV(trad), Batch Print, EasyPopulate, Simple Manual Order Entry, Encrypting Credit Card Via Mcrypt, UPSXML, Down for Maintenance, On The Fly GD Thumbs, SPPC, SPPC Hide, and various personal tweaks

Link to comment
Share on other sites

Does anyone know where I can get the Easy Populate contrib for Multi-Stores....or how to modify the more recent version of it? Really need this.....

Thanks in advance

 

I should have this ready in a few days. I will post it when it is tested and completed.

Link to comment
Share on other sites

Dear hobbzilla,

 

thanks a lot for your great contribution! Could install it without problems on an original 2.2ms2 (apart from small MySQL/Apache/PHP/Filesystem configuration problems not originating from you contrib).

 

While testing, seemingly found a small bug regarding M-S_pricing in /catalog/admin/customers.php: Customer's Group is not displayed for a customer and can also not be changed. Suggested Fix:

 

Line 162, change

'customers_newsletter' => $customers_newsletter);

to

'customers_newsletter' => $customers_newsletter,

and add as new line 163

'customers_groups_id' => $customers_groups_id); // oh M-S_pricing

 

Line 757, change

 

$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname";

 

to

 

$customers_query_raw = "select c.customers_id, cg.customers_groups_name, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from (" . TABLE_CUSTOMERS . " c inner join " . TABLE_CUSTOMERS_GROUPS . " cg on c.customers_groups_id = cg.customers_groups_id) left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . $search . " order by c.customers_lastname, c.customers_firstname"; // oh M-S_pricing

 

Hope this helps.

 

Kind regards,

aragorn108

Link to comment
Share on other sites

Dear Ryan,

 

while continuing the testing, creating new user account yields error:

 

1054 - Unknown column 'customers_info_source_id' in 'field list'

 

insert into customers_info (customers_info_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_account_last_modified, customers_info_source_id, customers_info_stores_id) values ('3', now(), '1', now(), now(), '0', '2')

 

[TEP STOP]

 

Column customers_info.customers_info_source_id seems to be from another mod (2159, How Did You Hear About Us?).

 

Is it correct to change /catalog/create_account.php, line 214 from

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_account_last_modified, customers_info_source_id, customers_info_stores_id) values ('" . (int)$customer_id . "', now(), '1', now(), now(), '". (int)$source . "', '" . STORES_ID . "')");

 

to

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_stores_id) values ('" . (int)$customer_id . "', '0', now(), '" . STORES_ID . "')");

 

i.e. reverting to original 2.2ms2 source plus new column customers_info_stores_id? Or does M-S depend upon inserting this record with an implicit 1st logon like

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_account_last_modified, customers_info_stores_id) values ('" . (int)$customer_id . "', now(), '1', now(), now(), '" . STORES_ID . "')");

 

Thanks for your feedback!

 

Kindly,

aragorn108

Link to comment
Share on other sites

aragorn108, you are a genius... :)

 

I noticed those errors a while ago and just put it down to 'minor bugs'. I'm glad you figured it out. Thanks mate!

 

The group issue was a big pain for me, so yeah, thanks!

 

Now to find a group discount module for a heavily modded site... :)

 

Steve

Edited by vr_driver
Link to comment
Share on other sites

Instead of reverting back to original code you only need to remove two bits from the query

 

so this is wot it should look like

 

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
//rmh M-S_multi-stores edited next line
  tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_date_of_last_logon, customers_info_number_of_logons, customers_info_date_account_created, customers_info_date_account_last_modified, customers_info_stores_id) values ('" . (int)$customer_id . "', now(), '1', now(), now(), '" . STORES_ID . "')");

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

I have been running several MultiStore1.7 stores for a while now(14 as of now and more to come) and it has worked great for us. I have been having an intermittent problem where a store will, on rare occassion, send an email confirmation from another store, although when I look in the orders module in the admin the proper store shows up fine for that order which tells me there is a bug in the checkout_process somewhere.

 

Initially we were on shared hosting but a month or two ago we got a dedicated machine at our host. The problem has occurred on both servers(BAMP).

 

I get alot of 'we have a problem with this,' but no one ever bothers to give me the details about which stores this is happening with. My guess is it hasnt happened more than 10 times in almost a year since the first store went live.

 

I do know the facts with two different instances of this problem for sure though. Store 10 sent a confirmation from store 5 and store 6 sent a confirmation from store 3. This might suggest that the store_id might be getting divided by 2 somehow before the store_name gets queried, but I cant state that as fact in all instances of this problem since our fullfillment people have ususally just told me there was a problem, not the details of it.

 

Has anyone else had this problem? I grazed through some of this thread and did some searches but did not find anything.

 

TIA

Matt

 

I figured out the problem(again) and it was not what I thought it was. I knew I had addressed this problem before, but just couldnt remember. As I got more emails detailing this problem I found out it was not order confirm emails at all.

 

We are using Batch Print Center and if you send a batch with an order status update email it uses the store you are in when the batch is run. I've simply pulled the store_name and replaced with store_owner. Since the store_owner is in the order confirm email it shouldnt be as confusing for our customers. Next step is to implement a query to pull proper store name for each order like Batch Print Center does in the pdfs...

Matt Mika

Installed Contributions: Multi-Stores, QTPro, CCGV(trad), Batch Print, EasyPopulate, Simple Manual Order Entry, Encrypting Credit Card Via Mcrypt, UPSXML, Down for Maintenance, On The Fly GD Thumbs, SPPC, SPPC Hide, and various personal tweaks

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