Jump to content
hobbzilla

Multi-Stores Multiple Shops Support

Recommended Posts

so if anyone's interested: I got the featured_products contribution working with this by created seperate featured tables in the database [ie yankees_featured, redsox_featured, cubs_featured] and dropped identical structures into each of them. Then I went through each store's catalog and altered the appropriate places where it calls for TABLE_FEATURED to the according featured table.

 

the only problem with this is that you have to hard edit the URL to go to the respective store's admin area to make changes. i guess that you have to do that with everything though...

 

if you have any questions, let me know. i'm not a pro, but gettin closer.

 

thanks for the freaking awesome contribution. I think I will use this in the future for other stores I create and so-on. you guys are awesome.

 

-brett

Share this post


Link to post
Share on other sites
Hi i have a very small problem i was wandering if anyone else has had ?

 

...

 

Has anybody got any ideas?

 

Thanks in advance

 

Sam

Yes. This is a known issue. As soon as I get some time on my hands I will have this fixed.. An easy work around is to _always_ change the name of the configuration table (then you can go back and rename it to what it was) when you update an existing store. The code tries to rename the table (and if the table name wasn't changed gives an error when you rename the table to the existing table!)

 

Whoops! :blink:

Share this post


Link to post
Share on other sites
Hi,

 

You getting anywhere on the Specials thing Zilla?

 

Cheers

Stot

Yeah.. I have looked at it and know how to fix it.

 

I just need to sit down and spend a few hours updating this module (adding a lesser-admin seems like a needed feature).

 

Free time has been my only enemy. Although spending what free time I have working gratis on opensource projects is fullfilling at some levels it doesn't pay the bills (nor ease the stress like going to play basketball!)

Share this post


Link to post
Share on other sites

Okay, i skimmed through this thread looking for an answer, buyt didnt see it. If it was answered allready, I appologize. But here is my question.

 

Can this contribution tie together stores on different domains? I have several stores at different domain addresses, and if I could administer them all from one admin, it would be great. Will this let me do that? Thanks.

Share this post


Link to post
Share on other sites
Can this contribution tie together stores on different domains?

Yes.

 

 

You can do it!

Share this post


Link to post
Share on other sites

I have a quick one. In the instruction it says to change both configure.php in the catalog directory and the admin directory when setting up another store.

 

Obviously I dont want to change much in admin, so what do I change. Or do I just add something in ?


Feel free to ask me for help

beep... beep....My Pager

Share this post


Link to post
Share on other sites

You don't have to copy the installation over and edit configure.php in catalog & admin ... you could always just perform the install from scratch and then update with all your modules, etc for each installation.

 

I find it easier however to install all my desired options and mods on one catalog install then copy that entire installation to either another subdomain or another domain entirely.. When you do this the filesystem paths change and therefore need to be updated in configure.php.

 

I.e. install a MS2 package in /home/oscommerce/public_html/catalog then update it with this mod as well as all the other great mods and then copy the entire "catalog" directory to /home/some-other-domain/pubilc/catalog .

 

Your configure.php in /home/some-other-domain/pubilc/catalog/includes/ will still show the old "/home/oscommerce/public_html/catalog" path.. Which is just not right.

 

HTH

Share this post


Link to post
Share on other sites

Yeah I got all that ok.

 

I was referring to where it says to change the configure.php in the ADMIN side. As there is only one admin, why do I have to change the admin configure, if i have more than one store, surely I want to add to it. But what and where.


Feel free to ask me for help

beep... beep....My Pager

Share this post


Link to post
Share on other sites

Hi,

 

I've just install the multi-store version 1.2 and have some problems, in my default shop, I must assign every catogory and sub categoru to it, right ?

 

but when i do this, i see my different category in my shop but no products :o , is it normal ?

 

Thanks

Edited by Marcomoro

Share this post


Link to post
Share on other sites

You also have to assign the products. In the future I will have an option to [ ]assign all products below this category and subcategories to this store. Also, I have a couple of people interested in sponsoring some work (paid) that will allow for multiple pricing of products per store. If this goes through I will be incorporating that too.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for your quick response,

 

I may have someting who don't work because I don't find where to assign products

 

help :(

Share this post


Link to post
Share on other sites

Hmm, your fix to the new_products.php does not work for me! Check out the message I got even on your new release. What's the fix again?

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's.specials_new_products_price, p.products_price) as products_pr

 

select p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s2s.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 LEFT JOIN specials_to_stores s2s ON s.specials_id = s2s.specials_id INNER JOIN products_to_stores p2s ON p.products_id = p2s.products_id where p2s.stores_id = '1' and products_status = '1' order by p.products_date_added desc limit 9

 

[TEP STOP]

Share this post


Link to post
Share on other sites

Quick add-on to my last post. The new_products.php module works in the subcategories, but on the main page or index.php it does not work properly and returns the error you see above. I am interested in sponsoring some implementations as well. I like the simplicity of your install versus the virtual mall. One thing that I am missing is the shared shopping cart and user account. I saw there are undertakings on it's way tough.

Share this post


Link to post
Share on other sites

Uploaded fixed file (see what happens when I don't troubleshoot on my side and just rely on code snippets???) here:

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

 

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, IF(s.status = '1' AND s2s.stores_id = '" . STORES_ID . "', s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id LEFT JOIN " . TABLE_SPECIALS_TO_STORES . " s2s ON s.specials_id = s2s.specials_id INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p2s.stores_id = '" . STORES_ID . "' and products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

added comma after '" . STORES_ID . "' in : IF(s.status = '1' AND s2s.stores_id = '" . STORES_ID . "'

Share this post


Link to post
Share on other sites

Ok I've resolve my problems with the products, there was a line missing...

 

I think everything is good installed but I have a big problem, when I force the use of cookie, I can't make any product in my basket, he's always empty, the same when I create a customer account, his lost after one click...

 

 

HELP Please I must use cookie

Share this post


Link to post
Share on other sites
Ok I've resolve my problems with the products, there was a line missing...

 

I think everything is good installed but I have a big problem, when I force the use of cookie, I can't make any product in my basket, he's always empty, the same when I create a customer account, his lost after one click...

 

 

HELP Please I must use cookie

Double check your defines for:

 

HTTP_COOKIE_DOMAIN

HTTPS_COOKIE_DOMAIN

HTTP_COOKIE_PATH

HTTPS_COOKIE_PATH

 

Are setup correctly for each and every store. (located in includes/configure.php)

Edited by hobbzilla

Share this post


Link to post
Share on other sites

Thanks for this quick response, I must be stupid, the error was in the configure.php, never think that I had look in this. THANKS

 

The other great stupid question ;) is:

 

I have my default shop, he work great but how can I do an other shop with your contrib on a other domain ?

 

what should I change an do ?

 

Thank you

Share this post


Link to post
Share on other sites

I have been looking at virtual mall and multi shop. The only advantage I found with virtual mall is that you can choose the shop in which the product is being listed under when adding a product or a category. Can that be implemented any way in the multi shop solution of yours?

 

Congrats on the new_products fix! It works fine!

 

Here is a piece of code including the dropdown shop choice on the add product page of virtual mall. Might help to implement it:

 

admin\categories.php
   a) In the section for "update products" (line 186), add the 
following to
the sql_data_array compilation after the 'manufacturers_id' line:
       'store_id' => 
tep_db_prepare_input($HTTP_POST_VARS['store_id']));
(line 202)
   b) In the product query line (Line 320), add ", p.store_id" into 
the
query following ", p.manufacturers_id" and before the "from" statement.
   c) After the manufacturers array retrieval (line 333) add the 
following
code:
       $store_array =array(array('id' => '', 'text' => TEXT_NONE));
       $store_query=tep_db_query("SELECT store_name, store_id FROM " .
TABLE_STORES . " order by store_name");
       while ($stores = tep_db_fetch_array($store_query)) {
           $store_array[] = array('id' => $stores['store_id'],
                       'text' => $stores['store_name']);
       }
   d) Add another line into the table to hold the store link after the
manufacturers link in the left column box (line 398)
       <td class="main"><?php echo TEXT_PRODUCTS_STORE; ?></td>
       <td class="main"><?php echo 
tep_draw_separator('pixel_trans_gif',
'24', '15') . ' ' . tep_draw_pull_down_menu('store_id', 
$store_array,
$pInfo->store_id);  ?></td>

Edited by SwissChris

Share this post


Link to post
Share on other sites

Also, another concern is my existing database. On install of the virtual mall, one has to add a 1 to each product in sql and then upload it. Can that be done for the 6000 products and more with multi shop as well, or is it necessary to edit each one of the products, via the store button? How would the edit of a product to upload look like?

Share this post


Link to post
Share on other sites
I have my default shop, he work great but how can I do an other shop with your contrib on a other domain ?

You mean you are setting up another hosting account?

 

ie. /home/www/default & /home/www/new OR /home/www/default/new

 

if this is the case and they are on the same physical machine then it is simple. simply copy (or preferrable compress & copy if you have shell access) the entire default install and copy it to "new". Then modify the database_tables.php & configure.php as mentioned in the install.txt.

 

If you are setting up hosting on another machine (or another host) you will need to be able to access the mysql server from the default shop. Most hosts will probably not allow this... at which case you should try at all costs to be on the same localhost (performance would benefit as well).

Share this post


Link to post
Share on other sites

ok I must be on the same hosting account ?

 

for example : www.myshop.com/catalog (default shop) and www.myshop.com/catalog2 (second shop)....

 

or can I do something like this : http://default.myshop.com (default shop) and http://shop2.myshop.com (second shop)...

 

the best would be this :

 

http://www.myshop.com (default shop) and www.theothershop.com (second shop)...

 

 

I hope my response is clear :(

 

thanks

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

×