Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi-Stores Multiple Shops Support


hobbzilla

Recommended Posts

i actually just skimmed the last page of posts here so excuse me if im mistaken or if the problem has been solved.....

 

but i think any ssl issues one might have have been discussed in this thread before and that the solutions are to be found in this thread....and i know 470 some posts are a lot to look through but many problems and solutions can be found by reading through them all.....

 

cheers to hobzilla and everyone else who keeps osc and these fabulous contributions alive and well......

Well there are only about 5 or 6 post on SSL I could find in this topic and they don't seem to bear any relevance to my problem and certainly are not exhaustive as to solving all ssl problems one might have.

 

I have read a great deal of this topic and maybe all of it; I don't recall exactly. I do like to read the forums for every contribution I use and every tangent that takes me on. But in this case I believe I have invested more than an appopriate amount of time researching with my own limited knowledge. I would prefer to wait for some clue from any knowledgeable person before continuing to try to solve this problem by my own. Thanks anyway.

I have moved on from oscommerce to magento and no longer monitoring this site.

Link to comment
Share on other sites

ONE STORE RULES ALL

 

for those in need of a setup where all the smaller stores feed into one larger store you might be able to solve your particular needs by adding just one line of code....

 

this solution is working for me.....as far as i can tell so far.....

 

the file you need to update is the categories.php file in the admin folder...

 

at about line 270 there is the following line:

 

//rmh M-S_multi-stores inserted next line

tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)$selected_store_id . "')");

 

which is basically the command that tells osc to tag the specific product being added by a specific store to just that stores id.......

 

simply add the following line right after the line above:

 

tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)1 . "')");

 

so that you have something that looks similar to this:

 

//rmh M-S_multi-stores inserted next line

tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)$selected_store_id . "')");

tep_db_query("insert into " . TABLE_PRODUCTS_TO_STORES . " (products_id, stores_id) values ('" . (int)$products_id . "', '" . (int)1 . "')");

 

and assuming that your main store has the store id number 1 this will tag that product to the "smaller store" that created it and tag the product to the store with "store id" number 1 which should be your "main store" the "one store that rules all"

 

if your main store is not store id 1....which i cant imagine why it wouldnt be.....i suspect all you need to do is figure out your "main store" store id and replace 1 with its id number.....

 

hope that made sense......

 

later.....

 

cheers to hobzilla!

Link to comment
Share on other sites

:D Thanks for the reply, I will give it a try soon, I installed Mamboo with a shoping cart and is currently busy with that as it seemed I'm not getting any help on here. When I have time and go through all of the above I will report back.

 

Thanks again.

 

Hi,

 

I am having a similar problem. Were you able to fix it?

 

Thanks

Link to comment
Share on other sites

and just fyi Dhananjaya i wasnt trying to be rude or insinuate anything.....i was truly trying to be helpful....sorry that you cuoldnt find your answer yet....

 

peace out osc freaks.....

 

Oh, was my tone defensive? ... or rude. I'm sorry if it was. It may be that I took your comments as a bit dissmissive and was concerned that would well, dissmiss my problem prematurely. So I just wanted to reafirm the need for any help when anyone, especially hobbszilla aka Ryan, is available to comment. I apologize if I was harsh. I certainly wouldn't want to discourage you or anyone else from offering any suggestions. I appreciate all feedback and I did re-search based on your feedback.

 

Thank you

I have moved on from oscommerce to magento and no longer monitoring this site.

Link to comment
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

 

Sorry I haven't been on here answer questions in a while. Hopefully, I can knock some of these out.

 

Do you have any other contributions installed? I have not seen this with a default installation of multi-stores. Are you running php5 perhaps? Please double check shopping_cart.php against the version included in M-S contrib.

Link to comment
Share on other sites

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.

 

Unfortunately including other contribs into my default contrib is how I got into a mess with the dev team. Please feel free to create a new contrib and submit it via the community/contributions link on the oscommerce team!

 

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

 

Do the new shops look and behave exactly like the 1st store? Did you remember to change the configuration table delcaration in each of the new stores?

Link to comment
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

 

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

 

The M-S contrib assumes that one of the stores configuration tables is named "configuration" if that is no longer the case any more, you will need to update application_top in admin around line 132.

 

define('TABLE_CONFIGURATION', 'configuration');

 

The rest of your errors are a result of this one. After you assign the default configuration table, then go and enter in the paths.. and then your languages file-manager should work.

 

HTH

Link to comment
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

 

I second this!  I personally want "one store to rule them all" because I'm running a shop that sells t-shirts for bands.  We want to have the main store, where every single shirt is available, and then the band stores, so each band has their own store.  It is vitally important, however, that the carts be able to go from store to store.  I'd also like to know if this mod works with the STS system so each store can look different.

 

 

Most of the code is in the shopping_cart class, I haven't attempted this but I remember having the behavior prior to some modifications. However you could run into session & cookie problems unless you are on the same site in a subdirectory.

 

I haven't tested STS with M-S but if it is based on MS2... I would assume it could be modified to work w/ M-S.

Link to comment
Share on other sites

Hi Ryan

 

Great contribution and seems to be working on the catalog side for both sites.  However when i go into admin/configuration/store name and change the name of the store it seems to change the name on both of my stores for whichever one i choose from the top right drop down.

 

This also seems to be the case in the configuration/multistores section -  the data here doesnt seem to reflect what's in the database for both store configuration tables.

 

I have check the STORE_ID of both stores and the configuration tables and they are linked...

 

any ideas???

kind regards

me

 

You have double checked that the stores configuration table value for STORES_ID is the same id as the set in the stores table? Are the values for the configuration fields changing upon selecting a new store from the drop down? Make sure after you select the new store from the drop down, that you the re-select the link on the left column.

 

Hi Ryan

 

I have another quetion....

 

When i come to edit a product in the catalog it goes to 'add new product' page instead of 'edit page' - is this a configuraion issue ?

 

regards

me

 

Are you logged in as the admin or a new admin with lesser priveledges?

Link to comment
Share on other sites

I can not login to admin

 

Create additional stores in Admin

Login to the administration side of osCommerce.

 

Default username is: admin

Default password is: admin

 

I have try whit

username is: admin

password is: admin

 

username is: admin

password is: 21232f297a57a5a743894a0e4a801fc3

 

Then I change in Mysql

administrators

change administratorspassword to only "a"

 

Nothing helps

 

What to do to login

 

Alfa

 

That long password is the encrypted form. If you went into the database and specified "a" as the new password, you will need to change that field type to "password" and then enter your new password.

 

If you are experiencing a loop after attempting to login.. please check your configure.php. Otherwise you should be getting an login error.

Link to comment
Share on other sites

I would like to thank hobbzilla for his continuing efforts on the multi-shop modification. I would also like to thank you for your attention and support in this thread to people's issues, including my own. That being said, I have thrown in the towel. I was never able to get multiple stores running reliably.

 

I was looking to host multiple stores under one domain, while sharing the customer database. If it wasn't one problem, it was another. My setup was obviously not condusive to running the osC/m-s setup or perhaps I was making the same installation mistakes over and over again. For those with the same goals as me, I suggest checking out Zen Cart. It's easier and more complete, and supports multiple stores with a single file modification.

 

Keep up the good work, hobbzilla, I'm sorry your contribution didn't work for me.  B)

 

Sorry it didn't work out for you. I have never considered Multi-stores an "easy" hack. There are quite a few things that need to be setup and for many users it may be too much of a learning curve to overcome. I am not familiar with the current offerings of Zen Cart but I believe it was based off of osc MS2... so don't know how they could offer multiple shop support with one file change... sounds interesting though.

Link to comment
Share on other sites

Hopefully just a quickie. Brilliant contribution, but I'm having problems with accessing the admin section through a shared SSL connection.

 

In short my http server is

 

http://www.mydomainname.co.uk

 

My https server is

 

https://mywebhost.com/~myusername/

 

When I log in via regular http everything works fine. Using SSL to connect, however, I simply get sent back to the login page repeatedly. Any thoughts or suggestions welcome, apart from this one niggle I am this happy :D  with the contribution.

 

Thanks in advance

 

Play around with the configure.php settings for HTTP_SERVER, etc. definitions in admin configure.php.. i.e. I would make them all https

Link to comment
Share on other sites

ADMIN LOGIN PROBLEM. (DOUBLE LOGIN REQUIRED)

 

I am up to 50 extra contributions installed into Multi-store and everything seems to be working. Haven't replicated yet, and I hope that doesn't bite me in the ass.

 

One thing that I am having problems with is the Admin login. I login once and everything comes up but as soon as I click on any menu item I get kicked out to the log in screen and have to login again.  After the 2nd login everything is fine. It's just becoming a huge pain in the ass.

 

Is anyone else having this problem? Any fixes? Suggestions? Recommendations? Anything at all?

 

Oh yeah, on V 1.6

 

Brad

 

double check your paths & values in configure.php in admin

Link to comment
Share on other sites

I have set up an additional administrator with permissions only for Catalog and one store. When I log in and try to add a Category by clicking on the new category button, the button moves to the right and nothing happens. All the links under Catalog work, I just can't add Categories and therefore Products.

 

If I change the permission to All shops, it works. I basically want a separate admin for each store who can only administrate categories and products in that one store. Am I missing something?

 

Assign the new admin to a distributor and assign the root category to the same distributor. He won't be able to create new categories in the main root level but that should solve your problem.. This was by design.

Link to comment
Share on other sites

Ok I've plunged in and started to install this and everything went fine, the admin section works great, but after making all the changes I were suppose to I get this:

Anybody know where to start looking for the error?

 

Please double check your database to see if you still have a table with named "configuration" if not, you will need to update the default definition in admin's application_top.

 

Is anybody still supporting this contribution?

 

Not as many as some other contributions!

Link to comment
Share on other sites

Hi Ryan,

 

Great to see you back. We all missed you.

 

We all understand you are very busy with life and work and were wondering if you could take a quick moment and make a quick tutorial on the theory and code of making something OSC Multi-Store enabled.

 

That would benefit the contribution by allowing us to contribute other new contributions and expand the functionality.

 

Thanks,

Brad

Link to comment
Share on other sites

Hi Ryan,

 

Great to see you back. We all missed you.

 

We all understand you are very busy with life and work and were wondering if you could take a quick moment and make a quick tutorial on the theory and code of making something OSC Multi-Store enabled.

 

That would benefit the contribution by allowing us to contribute other new contributions and expand the functionality.

 

Thanks,

Brad

 

This is one change i see repeatedly in the multi-store version of files:

 

//rmh M-S_multi-stores edited next line

if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, customers_basket_stores_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . STORES_ID . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");

 

WHICH REPLACED:

 

if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");

 

AND this occurs repeatedly for tep_db_query string involving products and categories etc.....it brings the STORES_ID into play and replaces $products_id with $products_id_string

 

not that that helps much but this is an obvious neccesity for calling products based upon store id.....

 

im sure hobzilla can clarify this better than me but other than this recurring change most other modifications to files concern the other contributions included in the multi-store contribution.....

 

just my two cents.....

 

later...

Link to comment
Share on other sites

double check your paths & values in configure.php in admin

 

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://domain.biz'); // eg, http://localhost - should not be empty for productive servers
//define('HTTP_CATALOG_SERVER', 'http://domain.biz');
//define('HTTPS_CATALOG_SERVER', 'https://domain.biz');
//define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
//define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/catalog/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/home/user/public_html/catalog/admin/'); // absolute pate required
//define('DIR_WS_CATALOG', '/catalog/'); // absolute path required
//define('DIR_FS_CATALOG', '/home/user/public_html/catalog/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
//define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
//define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
//define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
//define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

Link to comment
Share on other sites

Do the new shops look and behave exactly like the 1st store? Did you remember to change the configuration table delcaration in each of the new stores?

 

YES !

New Shops are copied from the default shop and I changed the config settings in "configure.php" which is located in each folder:

 

You can take a look at this:

 

http://www.runweb.de/multishop/catalog/

 

http://www.runweb.de/multishop/shop1/

 

http://www.runweb.de/multishop/shop2/

 

You see - all is working but the image size of shop1 and shop2 is wrong...

Edited by runweb

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

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

select a.admin_id, a.admin_rep_code, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name, g.admin_groups_id from admin a, admin_groups g where a.admin_id= 1 and g.admin_groups_id= 

 

I keep getting this error. any ideas why? I am getting them when I try to access orders and customer listings.

Link to comment
Share on other sites

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

select a.admin_id, a.admin_rep_code, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name, g.admin_groups_id from admin a, admin_groups g where a.admin_id= 1 and g.admin_groups_id= 

 

I keep getting this error. any ideas why? I am getting them when I try to access orders and customer listings.

 

 

also, for some reason, when I log in as admin:admin, it says "Access denied" when i try to go to add more administrators.

 

why?

Link to comment
Share on other sites

php]

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

 

select a.admin_id, a.admin_rep_code, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name, g.admin_groups_id from admin a, admin_groups g where a.admin_id= 1 and g.admin_groups_id=

 

[/php]

Hi Tomb

I barely manage to get by with php code. I don't understand the code very well at all but I have started to get an idea of some of the syntax due to going out on a limb with lots of contributions lumped together and getting buggy and having to debug them. In particular I've had this error lots of time on different installations. Usually it turns out to be one of the following:

 

1. I needed to add a field to that list to accomodate a new contribution, but because the new contribution doesn't know about the list, i.e. it is unique to another contribution, it didn't instruct me to change it or how to change it. So now I have to figure out how to change it on my own.

 

2. I did change it but changed it wrong, generally by not using commas or spaces or a ";" etc. correctly or making some typo.

 

3. In one recent case, on multi-shop install, I recall not being able to find the cited code from the error and eventually discovered the problem was not in a paragraph as cited, and as I have usually found it. I found the error in some list of lines that were supposed to end in "," or ";" but I had left one out.

 

In your case, I am suspicous of the cited code i.e. " from admin a, admin_groups g where a.admin_id= 1". It doesn't look right to me but I am a php beginner and it may be totally ok.

 

BTW, if you want specific help from anyone on this or any problem it really helps if you tell what page it is on and if you found the offending line of code cited and where it is exactly. And is that the whole error message?

 

I hope any of that helps. I'm just trying to be of some use here even though I still don't know a tep function from my elbow. :blush:

 

Edward

I have moved on from oscommerce to magento and no longer monitoring this site.

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