Jump to content
hobbzilla

Multi-Stores Multiple Shops Support

Recommended Posts

Problem - Fresh Install of V1.7

 

I have a problem at Point 4 in the install and I'm confused about the content of V1.7 vs V1.4.

 

I had V1.4 partially working but rather than spend more time on it, I started over and applied V1.7 over a clean OSC 2.2 base. I followed the instructions for steps 1 -3 but at step 4, I don't get a "Stores" link in the list on the left and I don't get a drop down box in the "My Store" screen [i do get the "multi-stores" item under "Configuration" in the list]. As a result I can't define any additional stores.

 

In 1.4 I had the Stores link and I was able to define multiple stores. 1.4 had changes to Admin that aren't contained in 1.7 so I'm wondering how it is supposed to work without those. I tried applying the 1.4 Admin changes but that resulted in a database query problem so I backed that out.

 

What have I missed?

 

Chris

Share this post


Link to post
Share on other sites

howdy Gang

 

I am wondering if anyone has gotten the affilitte contrubution installed and if so how did you get aroound the admin/index.php.. boy I am not a coder so I don't know how to do this..

 

any help would be thankfull.

 

Nopie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
howdy Gang

 

I am wondering if anyone has gotten the affilitte contrubution installed and if so how did you get aroound the admin/index.php.. boy I am not a coder so I don't know how to do this..

 

any help would be thankfull.

 

Nopie

 

I am having a worst problen affiliate..

 

I keep getting 404 internail error.. file missing or misconfigure.. through research I figured out maybe it had something to do with chmod..

the hosting I waa using went belly-up and I have to get new hosting..

Likely I was able to get into the cpanel and recover my files..

 

so I reaload the files from back up.. and started having the error problme stated above.. and I think the permission changed from downloading and reuploading.

and now I cann't log into my admin..

the way I had it set up didn't work so I deleted the administrator table from lthe database and reloaded the oringilal database file thinking I could us the login and password that was for temp and it didn't wrok..

 

what else do I need to change.. Thank you

noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

Me again...I've got Admin pretty close to working however I would like someone to tell me

WHERE IS store_config_table stored?

I have a database called stores, administrators, configuration, configuration_groups, distributors, categories_stores, categories_to_stores, languages_to_stores, Manufacturers_to_stores, products_to_categories, products_to_stores.

Teresa

Share this post


Link to post
Share on other sites

Hm - in my new shop the images are not calculated anymore ?

They are only visible in original size everywhere (boxes, product descrition...)

 

In my default shop the images are sized as defined in "admin=>images", but in the "shop1" the images are not in the size as defined in "admin=>images"...

 

What is that ?


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites

There must be a bug in the image-management:

 

When I put "Small image width" to 150 and "Small image height to "blank", the image is visible in original size and not "width 150" - only when I set something lik 0-..... in "Small image height" the image is calculated.

 

Normally it is enough to set either "Small image width" or "Small image heigth" to have same width or height for all images in the store.

 

Any idea to correct this bug ?


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites
Problem - Fresh Install of V1.7

 

I was originally going to the Admin folder to manage the stores but then I tried going to Catalog/Admin to see if I could manage the stores from there. That opens the Login screen but it won't take

admin admin

as the ID and password and basically just re-presents the same login screen no matter what I do.

 

Questions:

1. Should I be trying to use Catalog/Admin as the right place to manage the stores instead of Admin?

 

2. If so, any suggestions with the login that won't?

 

Chris

 

 

 

 

 

________________________

I have a problem at Point 4 in the install and I'm confused about the content of V1.7 vs V1.4.

 

I had V1.4 partially working but rather than spend more time on it, I started over and applied V1.7 over a clean OSC 2.2 base. I followed the instructions for steps 1 -3 but at step 4, I don't get a "Stores" link in the list on the left and I don't get a drop down box in the "My Store" screen [i do get the "multi-stores" item under "Configuration" in the list]. As a result I can't define any additional stores.

 

In 1.4 I had the Stores link and I was able to define multiple stores. 1.4 had changes to Admin that aren't contained in 1.7 so I'm wondering how it is supposed to work without those. I tried applying the 1.4 Admin changes but that resulted in a database query problem so I backed that out.

 

What have I missed?

 

Chris

Share this post


Link to post
Share on other sites

I have just about all I can stand of this.... I have debugged alot of my minor problems, which I have posted earlier, but right now I can't get past these two problems:

1146 - Table 'd60008208.TTS' doesn't exist

select configuration_id, configuration_title, configuration_value, use_function from TTS where configuration_group_id = '18' order by sort_order

and this

 

Warning: Division by zero in /mnt/web_k/d09/s01/a00091qk/www/MyStore1/nfoscomm/catalog/admin/includes/classes/split_page_results.php on line 33

1064 - You have an error in your SQL syntax near 'MAX_DISPLAY_SEARCH_RESULTS' at line 1

select currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, last_updated, value from currencies order by title limit -0, MAX_DISPLAY_SEARCH_RESULTS

[TEP STOP]

 

Now I am pretty sure the the first is my fault because I don't really understand how I am supposed to set up catalog/admin/includes configure.php, database_tables.php, and application_top.php

I've tried a million things. I've even tried to turn this part off temporarily so that I could see where the problem is

 

The second problem is keeping me from assigning languages and currencies as stated in the instruction. Logging in NO PROBLEMS, but almost every page has this 2nd problem. Thank God my catalog of products is untouched.

 

I haven't even messed with the CATALOG side in DAYS as I have been going nuts with these two problems....

PLEASE...I am begging....Can someone give a push in the right direction? I'm at my wits end! :'(

Teresa

Share this post


Link to post
Share on other sites

An Angel of Mercy o:) responded to the split_page_results problem I've been having. I had posted in the General support to see if I could turn off the split page results temporarily, but instead, someone sent me the solution....To any of you newbies out there struggling with the same problem I was having

Warning: Division by zero in /mnt/web_k/d09/s01/a00091qk/www/MyStore1/nfoscomm/catalog/admin/includes/classes/split_page_results.php on line 33

 

1064 - You have an error in your SQL syntax near 'MAX_DISPLAY_SEARCH_RESULTS' at line 1

select currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, last_updated, value from currencies order by title limit -0, MAX_DISPLAY_SEARCH_RESULTS

[TEP STOP]

add the below code to your applications_top.php and POOF!!! :thumbsup: The problem went away!

 

define ('MAX_DISPLAY_SEARCH_RESULTS' ,'15');

Hope this helps someone else....

 

Still need help with setting up my configure file and database_tables file if anyone would be so kind!

Teresa ;)

Share this post


Link to post
Share on other sites

Hi Chris and others,

 

I've just encouter the same problem as you, I wasn't able to do step 4 of installation on a clean ms2 version (in fact ms2fr, french version) :

" I don't get a "Stores" link in the list on the left and I don't get a drop down box in the "My Store" screen [i do get the "multi-stores" item under "Configuration" in the list]. As a result I can't define any additional stores. "

 

I'm quite happy not to be alone but will someone be able to help us ?

About your logg problem, I'm sorry I can't help you... re-install ??

 

Thx,

 

Hubombing

Edited by hubombing

Share this post


Link to post
Share on other sites
1.  In the instructions it says" 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."

Now I saw this section and I left it alone for the moment as I have no idea what it means or if I am or not...Could you explain in dummy terms what this is?!

 

During install osCommerce asks you where you want to store your sessions, in a directory (file based) or in a session table in mySQL (database). You can double check your option by looking at your configure.php

 

2. Here is the contribution, I'm talking about  contributions,702

Any thoughts on how I can properly integrate this as I have another logo for my other store.  Say LOGO_1 and LOGO_2

 

You should be still able to utilize that contrib if it stores it's information in the configuration table for each store, otherwise, just upload the image for the store logo and it use my code.

Share this post


Link to post
Share on other sites
I have checked and reinstalled all sql stuff and have verified that I do in fact have a configuration table as well as a configuration_groups table.

In the install instructions it says to install all and then log into the Admin side to set up your stores...Well obviously I can't log in to do that so ......

That's where I am....If anyone has any help or comments I would greatly appreciate it.

Best Wishes

Teresa - ttstitches

 

Can you look at your administrators table and see what value administrators_stores_id it says is being used for the user you are loggin in as... does that stores_id exist in the stores table? Also, does the table "configuration" exist? That is used as a default in application_top.php in the admin. If it doesn't you will need to define one that exists.

Share this post


Link to post
Share on other sites
Problem - Fresh Install of V1.7

 

I was originally going to the Admin folder to manage the stores but then I tried going to Catalog/Admin to see if I could manage the stores from there. That opens the Login screen but it won't take

admin admin

as the ID and password and basically just re-presents the same login screen no matter what I do.

 

Questions:

1. Should I be trying to use Catalog/Admin as the right place to manage the stores instead of Admin?

 

2. If so, any suggestions with the login that won't?

 

Chris

 

 

1) catalog/admin vs. admin ?? There should be just one admin. Otherwise it is duplication of files.. unless you have one updated admin and another that is still stock MS2.

 

2) You can reset your password by using either phpmyadmin and typing in a new password when you edit the admin record and selecting the entry type as password, or deleting the admin user and re-running the INSERT statment from update.sql

 

 

I have a problem at Point 4 in the install and I'm confused about the content of V1.7 vs V1.4.

 

I had V1.4 partially working but rather than spend more time on it, I started over and applied V1.7 over a clean OSC 2.2 base. I followed the instructions for steps 1 -3 but at step 4, I don't get a "Stores" link in the list on the left and I don't get a drop down box in the "My Store" screen [i do get the "multi-stores" item under "Configuration" in the list]. As a result I can't define any additional stores.

 

In 1.4 I had the Stores link and I was able to define multiple stores. 1.4 had changes to Admin that aren't contained in 1.7 so I'm wondering how it is supposed to work without those. I tried applying the 1.4 Admin changes but that resulted in a database query problem so I backed that out.

 

What have I missed?

 

Chris

 

The stores link should show up in the admin panel from column_left.php if the logged in user has been granted access to that box. (access granted from administrators).

If it isn't showing up, please verify that you are logged in as admin & that the admin's administrator_id from the administrators table is equal to '1'.

Share this post


Link to post
Share on other sites
I am having a worst problen affiliate..

 

I keep getting 404 internail error.. file missing or misconfigure.. through research I figured out maybe it  had something to do with chmod.. 

the hosting I waa using went belly-up and I have to get new hosting..

Likely I was able to get into the cpanel and recover my files..

 

so I reaload the files from back up.. and started having the error problme stated above.. and I think the permission changed from downloading and reuploading.

and now I cann't log into my admin..

the way I had it set up didn't work so I deleted the administrator table from lthe database and reloaded the oringilal database file thinking I could us the login and password that was for temp and it didn't wrok..

 

what else do I need to change.. Thank you

noppie

 

404 errors happen when you don't have access (or haven't defined the file for access in admin/includes/functions/administrators.php -- follow the structure for all new files by other contribs).

Share this post


Link to post
Share on other sites
Me again...I've got Admin pretty close to working however I would like someone to tell me

WHERE IS store_config_table stored?

I have a database called stores, administrators, configuration, configuration_groups, distributors, categories_stores, categories_to_stores, languages_to_stores, Manufacturers_to_stores, products_to_categories, products_to_stores.

Teresa

 

In the stores table.

Share this post


Link to post
Share on other sites
There must be a bug in the image-management:

 

When I put "Small image width" to 150  and "Small image height to "blank", the image is visible in original size and not "width 150" - only when I set something lik 0-..... in "Small image height" the image is calculated.

 

Normally it is enough to set either "Small image width" or "Small image heigth" to have same width or height for all images in the store.

 

Any idea to correct this bug ?

 

Nothing has been changes in v1.7 in regards to the tep_ image functions. You may want to double check your version of html_output against a stock MS2 copy.

Share this post


Link to post
Share on other sites
1146 - Table 'd60008208.TTS' doesn't exist

select configuration_id, configuration_title, configuration_value, use_function from TTS where configuration_group_id = '18' order by sort_order

 

Multi-Stores doesn't use a table TTS or define it anywhere... You need to double check installation instructions for the contribution you are trying to use. My guess is you didn't define the table in database_tables.php

Share this post


Link to post
Share on other sites
Hi Chris and others,

 

I've just encouter the same problem as you, I wasn't able to do step 4 of installation on a clean ms2 version (in fact ms2fr, french version) :

" I don't get a "Stores" link in the list on the left and I don't get a drop down box in the "My Store" screen [i do get the "multi-stores" item under "Configuration" in the list]. As a result I can't define any additional stores. "

 

I'm quite happy not to be alone but will someone be able to help us ?

About your logg problem, I'm sorry I can't help you... re-install ??

 

Thx,

 

Hubombing

 

Have you double checked column_left & /admin/boxes/stores.php. Are you logging in as admin?

Share this post


Link to post
Share on other sites

TTS is what I have defined as in the database as my store ID

Teenie Tiny Stitches

You are correct...there is no database by this name, I got the impression from the instructions that this store_config_table was made in admin, once you got everything installed right.

Am I incorrect...do I need to make a database for the store config, and if so, what sql element need to be in it.

OR

do I just not have my application_top defined inproperly?

I just don't understand your instructions.

In application top (which is where it looks like all the configuration stuff is defined)

do I insert my store ID in cfgKey and set cfg value 1??? or do I change "configuration" to TTS where configuration is defined? This all seems a little cryptic to me...I guess I am just not as bright as all you!

Here is my store table

stores_id stores_name            stores_image        stores_url    stores_config_table  stores_status 

1            Teenie Tiny Stitches  NewWebLogo1.jpg http://www.  TTS                          1

 

2            Ribbons In Bloom      posslogoB.jpg        http://www  RIB                          1

Yes I took out some of the url just for showing purposes here...I may not be as bright as all of you, but I can type a url I also am not showing the date_added and modified because of the lack of room

Now in application_top I have this

//rmh M-S_multi-stores begin
//**************
// BLOCK_A BEGIN
//**************

 if (tep_session_is_registered('login_id')) {
   if ( (isset($HTTP_GET_VARS['store_config_table'])) && (($HTTP_GET_VARS['store_config_table'] != '') && (strtolower($HTTP_GET_VARS['store_config_table']) != 'null') && (strlen(trim($HTTP_GET_VARS['store_config_table'])) > 0)) ) {
     $selected_store_id = $HTTP_GET_VARS['store_config_table'];
     tep_db_query("update " . TABLE_ADMINISTRATORS . " set administrators_selected_stores_id = '" . tep_db_input($selected_store_id) . "' where administrators_id = '" . (int)$login_id . "'");
   }

   $admin_store_query = tep_db_query("select administrators_selected_stores_id, administrators_allowed_stores from " . TABLE_ADMINISTRATORS . " where administrators_id = '" . (int)$login_id . "'");
   $admin_store = tep_db_fetch_array($admin_store_query);
   $admin_allowed_stores = explode('|', $admin_store['administrators_allowed_stores']);

   if ($admin_store['administrators_selected_stores_id'] <= '0') {
     if ($admin_allowed_stores[0] != '*') {
       $selected_store_id = $admin_allowed_stores[0];
     } else {
       $first_store_query = tep_db_query("select stores_id FROM " . TABLE_STORES . " ORDER BY stores_id ASC LIMIT 1");
       $first_store = tep_db_fetch_array($first_store_query);
       $selected_store_id = $first_store['stores_id'];
     }
   } elseif ( in_array($admin_store['administrators_selected_stores_id'], $admin_allowed_stores, true) || ($admin_allowed_stores[0] == '*')  ) { //strict
     $selected_store_id = $admin_store['administrators_selected_stores_id'];
   } else {
     $selected_store_id = $admin_allowed_stores[0];
   }

   $stores_query = tep_db_query("select stores_config_table from " . TABLE_STORES . " where stores_id = '" . (int)$selected_store_id . "'");
   $stores = tep_db_fetch_array($stores_query);

   if ($stores == NULL || $stores == '') {
     define('TABLE_CONFIGURATION', 'configuration');
     $selected_store_id = '1';
   } else {
     define('TABLE_CONFIGURATION', $stores['stores_config_table']);
   }
 } else {
   define('TABLE_CONFIGURATION', 'configuration');
   $selected_store_id = '1';
 }

 tep_db_query("update " . TABLE_ADMINISTRATORS . " set administrators_selected_stores_id = '" . tep_db_input($selected_store_id) . "' where administrators_id = '" . (int)$login_id . "'");
 tep_session_register('selected_store_id');
 tep_session_register('admin_allowed_stores');
//rmh M-S_multi-stores end

// set application wide 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']);
 }

// define our general functions used application-wide
 require(DIR_WS_FUNCTIONS . 'general.php');
 require(DIR_WS_FUNCTIONS . 'html_output.php');

// initialize the logger class
 require(DIR_WS_CLASSES . 'logger.php');

// include shopping cart class
 require(DIR_WS_CLASSES . 'shopping_cart.php');

// some code to solve compatibility issues
 require(DIR_WS_FUNCTIONS . 'compatibility.php');
//**************
// BLOCK_A ENDS 
//**************
//rmh M-S_multi-stores end

so what do I change in here and to what do I change it to ?????

Teresa

Multi-Stores doesn't use a table TTS or define it anywhere... You need to double check installation instructions for the contribution you are trying to use. My guess is you didn't define the table in database_tables.php

Share this post


Link to post
Share on other sites

Good day

 

I got most of it working.. and then I decided I better go and buy a product and see how everything is working..

and when I went to check out I get this error.

 

Fatal error: Call to a member function on a non-object in /home/xxxxx/public_html/catalog/includes/classes/shopping_cart.php on line 258

 

please how do I fix it??

Thank you very much

noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

hobzilla, would like to thank you frist of all for all the hard work you put into this incredible mod here. Installed it yesterday and it'll save me so many headaches.

 

On another note though I just converted the Featured Products mod to work with the Multi-Stores, havent done any documentation up for it though :( shoot me PM if you want it and i'll zip it up and you can include it in your next release.

Share this post


Link to post
Share on other sites
Nothing has been changes in v1.7 in regards to the tep_ image functions. You may want to double check your version of html_output against a stock MS2 copy.

 

HI, hobbzilla !

 

The problem is:

My default shop is working and new shops are not - the new shops are copied from the default catalog - there is nothing changed...but in new shops the image setting have no action to the stores...

 

:o


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites

FEATURE SETS By WOLFEN for MULTI-STORE

 

Has anyone integrated Wolfen's Feature Product contribution with Multi-Store yet?

http://www.oscommerce.com/community/contri...l/search,wolfen

 

 

I have installed it and it is working except for the fact that featured products are blind to store restrictions and require that the queries be modified with the STORE ID stuff being inserted.

 

 

And it only looks like one file that needs to be ended would be the catalog/includes/modules/featured_sets.php file.

 

Example:

 

<?php

$featured_products_category_id = $new_products_category_id;

 

if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) { // We are not in category depth; we are on the main page

$featured_products_query_raw = "SELECT p.products_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_PRODUCTS;

} else { // We are in category depth

$featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$featured_products_category_id . "' and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . " limit " . MAX_DISPLAY_FEATURED_PRODUCTS;

}

 

There are also some queries for featured manufacturers that would also need the multi-store changes.

 

Any help on this would be very beneficial to expanding modules for this suite and make it even more powerful.

 

Thanks in advance.

 

Brad

P.S. If anyone would like to send me a quick tutorial on how to make a contribution "multi-store" compatible please PM or post something. I have a lot of great ideas I would like to implement to make this really powerful.

Share this post


Link to post
Share on other sites

Hi

I'm still having a bitch of a time. Thought I had it all sorted out on ADMIN side. I had to completely delete the store I had and start anew. I added 2 stores, added define default language, added define default currencies, even added categories to stores, however I hadn't duplicated the site for the second store yet before, low and behold my old eror came up

1146 - Table 'd60008208.TABLE_CONFIGURATION' doesn't exist

 

select configuration_key as cfgKey, configuration_value as cfgValue from TABLE_CONFIGURATION

 

[TEP STOP]

Here is the section in admin/application_top.php where the multi-stores is installed.

 

////rmh M-S_multi-stores
// HAD START SESSIONS FIRST TO MAKE SURE AN ADMIN IS LOGGED IN
// Moved BLOCK_A BELOW tep_session_start();
// set application wide 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']);
}
 

// ##### IMPORTANT #####
// **** Uncomment & set valid path if you using file based sessions ****
// define('SESSION_WRITE_DIRECTORY', '/tmp');
// define our general functions used application-wide
//  require(DIR_WS_FUNCTIONS . 'general.php');
// require(DIR_WS_FUNCTIONS . 'html_output.php');

// initialize the logger class
// require(DIR_WS_CLASSES . 'logger.php');

// include shopping cart class
// require(DIR_WS_CLASSES . 'shopping_cart.php');

// some code to solve compatibility issues
// require(DIR_WS_FUNCTIONS . 'compatibility.php');

// check to see if php implemented session management functions - if not, include php3/php4 compatible session class
 if (!function_exists('session_start')) {
   define('PHP_SESSION_NAME', 'osCAdminID');
   define('PHP_SESSION_PATH', '/');
   define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);

   include(DIR_WS_CLASSES . 'sessions.php');
 }

// define how the session functions will be used
 require(DIR_WS_FUNCTIONS . 'sessions.php');

// set the session name and save path
 tep_session_name('osCAdminID');
 tep_session_save_path(SESSION_WRITE_DIRECTORY);

// set the session cookie parameters
  if (function_exists('session_set_cookie_params')) {
   session_set_cookie_params(0, DIR_WS_ADMIN);
 } elseif (function_exists('ini_set')) {
   ini_set('session.cookie_lifetime', '0');
   ini_set('session.cookie_path', DIR_WS_ADMIN);
 }

// lets start our session
 tep_session_start();

//rmh M-S_multi-stores begin
//**************
// BLOCK_A BEGIN
//**************

 if (tep_session_is_registered('login_id')) {
   if ( (isset($HTTP_GET_VARS['store_config_table'])) && (($HTTP_GET_VARS['store_config_table'] != '') && (strtolower($HTTP_GET_VARS['store_config_table']) != 'null') && (strlen(trim($HTTP_GET_VARS['store_config_table'])) > 0)) ) {
     $selected_store_id = $HTTP_GET_VARS['store_config_table'];
     tep_db_query("update " . TABLE_ADMINISTRATORS . " set administrators_selected_stores_id = '" . tep_db_input($selected_store_id) . "' where administrators_id = '" . (int)$login_id . "'");
   }

   $admin_store_query = tep_db_query("select administrators_selected_stores_id, administrators_allowed_stores from " . TABLE_ADMINISTRATORS . " where administrators_id = '" . (int)$login_id . "'");
   $admin_store = tep_db_fetch_array($admin_store_query);
   $admin_allowed_stores = explode('|', $admin_store['administrators_allowed_stores']);

   if ($admin_store['administrators_selected_stores_id'] <= '0') {
     if ($admin_allowed_stores[0] != '*') {
       $selected_store_id = $admin_allowed_stores[0];
     } else {
       $first_store_query = tep_db_query("select stores_id FROM " . TABLE_STORES . " ORDER BY stores_id ASC LIMIT 1");
       $first_store = tep_db_fetch_array($first_store_query);
       $selected_store_id = $first_store['stores_id'];
     }
   } elseif ( in_array($admin_store['administrators_selected_stores_id'], $admin_allowed_stores, true) || ($admin_allowed_stores[0] == '*')  ) { //strict
     $selected_store_id = $admin_store['administrators_selected_stores_id'];
   } else {
     $selected_store_id = $admin_allowed_stores[0];
   }

   $stores_query = tep_db_query("select stores_config_table from " . TABLE_STORES . " where stores_id = '" . (int)$selected_store_id . "'");
   $stores = tep_db_fetch_array($stores_query);

   if ($stores == NULL || $stores == '') {
    // define('TABLE_CONFIGURATION', 'configuration');
     define('TABLE_CONFIGURATION', 'ttsconfig');
     $selected_store_id = '6';
   } else {
     define('TABLE_CONFIGURATION', $stores['stores_configuration_table']);
    
   }
 } else {
   define('TABLE_CONFIGURATION', 'ttsconfig');
  // define('TABLE_CONFIGURATION', 'configuration');
   $selected_store_id = '6';
 }

 tep_db_query("update " . TABLE_ADMINISTRATORS . " set administrators_selected_stores_id = '" . tep_db_input($selected_store_id) . "' where administrators_id = '" . (int)$login_id . "'");
 tep_session_register('selected_store_id');
 tep_session_register('admin_allowed_stores');
//rmh M-S_multi-stores end

 

Can someone see what I have done wrong? There's no going back at this point as I have somehow corrupted/or overwritten my backup by accident...So I am doomed with this until I find a solution... I haven't even started debugging the CATALOG SIDE! When I added a new store, 'ttsconfig' and 'ribconfig' are what I assigned to the configuration table.

 

Also, Isn't there supposed to be an area in admin where you assign the paths for directories that I commented out in one of the installation steps??? I would guess that if I were to click on MultiStores in the left column that is where this might show up????? Because I get nothing when I click on the MultiStores link NOTHING!!!

 

And lastly...when I added engilish as a default language....all seemed to go well except when you press the details button....I get an error saying that there is no such directory/file dir (english) define_languages.php which I really don't understand as I have it in the ADMIN directory and my ADMIN/INCLUDES/LANGUAGES/ENGLISH directory... Also checked application_top and class/languages for something to pop out at me but I don't see anything glaring...

I have a HEAVILY modded site.... and I am really starting to freak out here! Can someone please help?? :x

Teresa

Share this post


Link to post
Share on other sites

Im wondering if anyone has worked on getting a shared shopping cart for multi-stores. I figured how to get all account history showing in each store, it was easy. But I havent looked into sharing the cart yet. Funny thing is I was able to place one order across multiple stores, but cant seem to do it again, its now losing the items when I go to another store. I assume its a matter of using the same session across stores. Do I just need to setup links with the session id urlencoded? I'll start looking into it, but I just wanted to get a feel from others first. TIA


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×