Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi-Stores Multiple Shops Support


hobbzilla

Recommended Posts

Is there a way to select the current store configuration so we can edit them separately within the admin interface?

Should be a drop down once you select "configuration". It is at the top right corner entitled, "Select store to Administer: [ STORE ]"

 

HTH

Link to comment
Share on other sites

Sorry ! I made the question more clear.

 

In your contribution' date=' you modified many php files to select data for specified stores eg. in manufacturers_info.php

 

//rmh multi-stores added next 3 lines

$manufacturers_to_stores_query = tep_db_query("select count(*) as count from " . TABLE_MANUFACTURERS_TO_STORES . " where manufacturers_id = '" . (int)$manufacturer['manufacturers_id''] . "' and stores_id = '" . STORES_ID . "'");

 

Where and when to assign to the STORES_ID ? Is it use define or a variable ?

Link to comment
Share on other sites

Sorry ! I made the question more clear.

 

In your contribution, you modified many php files to select data for specified stores eg. in manufacturers_info.php

 

Where and when to assign to the STORES_ID ? Is it use define or a variable ?

Like I noted previously. The STORES_ID is defined in the database configuration table for the respective store. It is not a variable. It is a constant. If you have more than one installation of osCommerce using the same configuration table the you effectively have an exact copy of the same store (products, specials, etc.) You will see no difference with regard to what products are displayed between the two shops. This is also true if you use different configuration tables for each store, however (either by choice or error) use the same STORES_ID in the table.

 

You can think of it the same as you do: STORE_COUNTRY or USE_CACHE where each store can have a different STORE_COUNTRY or enable/disable USE_CACHE.

Link to comment
Share on other sites

 

popup_image.php uses the defined DIR_WS_IMAGES (from configure.php) you can change that OR you can do what I do and use Linux's sybolic link command!

 

ln [-f] [-n] [-s] existingfile newname

Must first take this opportunity to express my sincere thanks for the great genius job done by hobbzilla :lol:

 

I have just successfully installed the stuff! It's really great!

 

Just one small point need somebody's help, as I am a technical dummy.

 

MAIN SITE IMAGES FOLDER: /home/promoitem/domains/wholesale.how.la/dropship/images/

PARTNER STORE IMAGES FOLDER: /home/normsun/domains/feng-shui.mfr.biz/images/

 

I just know what is SSH and could type in copied command.

 

Should I type this after SSH login:

 

cd /home/promoitem/domains/wholesale.how.la/dropship/

ln -s ./images ./home/normsun/domains/feng-shui.mfr.biz/images/

 

 

Heartfelt thanks for any king advice :P

Link to comment
Share on other sites

Should I type this after SSH login:

 

cd /home/promoitem/domains/wholesale.how.la/dropship/

ln -s ./images ./home/normsun/domains/feng-shui.mfr.biz/images/

 

 

Heartfelt thanks for any king advice  :P

I think (without attempting it) you have it backwards.

 

You need to go to the new store and create the link.

 

cd /home/normsun/domains/feng-shui.mfr.biz/
ln -s ./images /home/promoitem/domains/wholesale.how.la/dropship/images/

Edited by hobbzilla
Link to comment
Share on other sites

Sorry for my stupidity. Please kindly advice once again with the exact syntax, as I have no SSH command knowledge. My apologies once again for wasting your valuable time.

 

Should there be no "." before /home/pro...

 

Is this syntax exactly correct?

 

cd /home/normsun/domains/feng-shui.mfr.biz/public_html/

ln -s ./images /home/promoitem/domains/wholesale.how.la/public_html/dropship/images/

 

I have tried a few different syntax, and repeating entry. The final thing I see over SSH is here:

 

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

[root@server root]# cd /home/normsun/domains/feng-shui.mfr.biz/public_html/

[root@server public_html]# ln -s ./images /home/promoitem/domains/wholesale.how.la/public_html/dropship/images/

ln: `/home/promoitem/domains/wholesale.how.la/public_html/dropship/images//images': File exists

[root@server public_html]#

 

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

 

What should I do to clean up anything that I have messed up?

 

 

I repeat the exact directory once again here for your kind advice.

 

MAIN MASTER SITE IMAGES FOLDER (that I would upload product here):

/home/promoitem/domains/wholesale.how.la/public_html/dropship/images/

 

SECONDARY STORE IMAGES FOLDER:

/home/normsun/domains/feng-shui.mfr.biz/public_html/images/

Link to comment
Share on other sites

Sorry for my stupidity.  Please kindly advice once again with the exact syntax, as I have no SSH command knowledge.  My apologies once again for wasting your valuable time.

Opps. Looks like I steered you a little wrong. I logged into my account to perform this and it worked fine for me.. should be the same on your system if you have correct permissions for the user logged in as.

 

First you must either make sure you delete the images directory OR rename it from (renaming probably the smarter of the two options to begin with (i.e.

mv images images2

):

 

/home/normsun/domains/feng-shui.mfr.biz/public_html/images/

 

cd /home/normsun/domains/feng-shui.mfr.biz/public_html
ln -s /home/promoitem/domains/wholesale.how.la/public_html/dropship/images images
ls -la images

the last line is to verify it is setup correctly.

 

in order to clean anything up that you have created.. you will first need to know what you created. Then simply delete the bad entries with the rm command.

Link to comment
Share on other sites

:lol: EXACTLY! BINGO!

 

My sincere thanks for your kind helping hands.

 

This is really a GREAT IDEA to rapidly expand my wholesale dropship business by offering reseller a chance to have his own domain own admin retail storefront. :D

 

I suppose this is your original idea to develop this? Or can you point me to anywhere to unleash the full use of your original idea? It seems that I am confused by the terminology - mall, mutli-store, multi-vendor. Anyway, it seems that your contribution is perfect for my need mentioned above.

 

I have tried to create 2 test sites, but when I enter the admin it seems that both the main site and the partner reseller store have same level of admin. e.g. I see a "Select store to Administer:" which both the main and the partner have full rights to even admin the MAIN site and all partners.

 

I just build up the PARTNER site by copying the whole oscommerce folder from the MAIN (with your contribution integrated) to the PARTNER. Is there anything I should modify or delete so that PARTNER could not admin back the MAIN?

 

Or is it the designed to be all stores admin is at the same level without any so called MAIN? But I have read thru all 24 pages here, and seems that your design should have one admin-all, rather than what I see all-admin-all!

 

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

Sorry, may I ask if you normally take up freelance job? Seems that I might need some further customization in 2-3 months later. Please kindly email me private if you do! THANKS!

Link to comment
Share on other sites

Ryan,

 

Could you help me out with a bit of code I have. I have set this up to display manufacturer tabs instead of category tabs in one of my stores. However ALL manufacturers show up, what do I need to change to just get the store only manufacturers to show.

 

<div style="background-color: #8c070a; border-bottom: 1px solid #7d0507;">

    <center>

      <table border="0" cellspacing="0" cellpadding="0">

        <tr>

<?php

  $categories_query = tep_db_query("select c.manufacturers_id , c.manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " c, " . TABLE_MANUFACTURERS_INFO . " cd where c.manufacturers_id = cd.manufacturers_id and cd.languages_id='" . (int)$languages_id ."' order by c.manufacturers_name");

  while ($categories = tep_db_fetch_array($categories_query))  {

?>

          <td style="background: url('<?php echo DIR_WS_IMAGES . 'planet/headerTabs-left.gif'; ?>'); width: 7px;"><img src="<?php echo DIR_WS_IMAGES . 'planet/trans.gif'; ?>"></td>

          <td bgcolor="#ffffff"><table width="100%" height="23" border="0" cellpadding="0" cellspacing="0">

              <tr>

                <td><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $categories['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . $categories['manufacturers_image'], $categories['manufacturers_name']) . '</a>'; ?></td>

              </tr>

            </table></td>

          <td style="background: url('<?php echo DIR_WS_IMAGES . 'planet/headerTabs-right.gif'; ?>'); width: 7px;"><img src="<?php echo DIR_WS_IMAGES . 'planet/trans.gif'; ?>"></td>

          <td><img src="<?php echo DIR_WS_IMAGES . 'planet/trans.gif'; ?>"></td>

 

        </tr>

      </table>

    </center>

</div>

Link to comment
Share on other sites

Could you help me out with a bit of code I have. I have set this up to display manufacturer tabs instead of category tabs in one of my stores. However ALL manufacturers show up, what do I need to change to just get the store only manufacturers to show.

Change:

 

$categories_query = tep_db_query("select c.manufacturers_id , c.manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " c, " . TABLE_MANUFACTURERS_INFO . " cd where c.manufacturers_id = cd.manufacturers_id and cd.languages_id='" . (int)$languages_id ."' order by c.manufacturers_name");

 

to..

 

$categories_query = tep_db_query("select c.manufacturers_id , c.manufacturers_name, manufacturers_image from " . TABLE_MANUFACTURERS . " c, " . TABLE_MANUFACTURERS_INFO . " cd LEFT JOIN " . TABLE_MANUFACTURERS_TO_STORES . " m2s ON c.manufacturers_id = m2s.manufacturers_id where c.manufacturers_id = cd.manufacturers_id and cd.languages_id='" . (int)$languages_id ."' and m2s.stores_id = '" . STORES_ID . "' order by c.manufacturers_name");

Link to comment
Share on other sites

Thanks for that Ryan, very helpfull.

 

I need the functionality you are talking for a store, that is just being finished off in testing. So if you are still looking for beta testers, I will happily help out.

 

rgds

Paul

Link to comment
Share on other sites

Hi. I have spent most of today installing and configuring this contribution with my store. I have quite a few contributions added so had to do it all by hand looking for the various entries.

 

The troubles I am having are:

 

1) I can't find a drop down list in the admin to select the different stores. I can't find any code that would represent it. Perhaps it's missing or I'm not looking in the right place. Could you point me to the code that I am meant to insert? As a work-around, I used this code instead on line 66 of application_top.php so that I can configure by using the url of the new store/admin.

 

$stores_query = tep_db_query("select stores_config_table from " . TABLE_STORES . " where stores_url LIKE '%" . $_SERVER['HTTP_HOST'] . "%'");

 

2) I am finding that when I have a specials entry and select to have that entry show in multiple stores, it creates multiple entries of the product when I browse to the category. the amount of extra entries depends on how many stores I have selected it to be viewable in. It shows me one as discounted and the others at full price.

 

3) (This one ins't a problem, just some thougts) Had a bit of trouble figuring out that STORES_ID was the cause of much of my troubles but have solved that now. This was because I modified admin/stores.php on line 65 with:

 

tep_db_query("INSERT INTO " . $stores_config_table . " SELECT * FROM configuration");

tep_db_query("INSERT INTO " . $stores_config_table . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Stores ID', 'STORES_ID', '" . $stores_id . "', 'The id of my store', '6', '0', now())");

 

instead of the multitude of insert statements with configuration options that I didn't want. Basically, what it does is copy the default configuration. Needs tweaking though to update the STORES_ID and STORE_NAME. Perhaps you could include in your next version. Better still, if you could select from a dropdown with store configuration to copy.

 

4) another tweak I have done is to have the system use the same store files but to use different images and language directories according to the site being viewed. Means that the core files can be updated instantly for all sites. Basically it is something like this:

 

switch($_SERVER['HTTP_HOST']){ //select the correct configuration table for the right store

case "www.website.co.uk":

define('FS_STORE_NAME','website');

 

And then use FS_STORE_NAME in place of other entries in configuration.php

 

Hope this helps and I hope you can help me with my multiple specials problem.

 

Thanks

JD

Link to comment
Share on other sites

Hello everybody

 

I discovered this contribution yesterday, read almost all the threads and I am very excited about it because it looks like the solution I was looking for.

This is what I want:

 

1- A web site where multiple vendors can add/modify/remove theirs products by accessing his/her own control panel (nobody else can access it but the SuperAdmin, which is the web site owner, and have his own control panel or level of access to manage the whole system)

2- The main website should be able to list all the products grouped by category or by vendor.

3-When a product is purchased by a visitor, the system sends an email to the vendor with the details of the purchase. The vendor will ship the product, delivery it etc.

4-A method to give the web site's owner a percent of each sale made by all the vendors.

4.1- method 1: the website owner sends an invoice to each vendor at the end of the week (any predefined period, week, 15 days, a month)

4.2 -method 2: (prefered) When the sale is complete, the system takes a percent for the web site owner and deposit the rest into the vendor's own account (2check out or any similar)

 

5- If possible, but not a requirement, a forum or public area where customers can talk about the products listed, make suggestions, rate a product/vendor etc.

 

Does this contribution do all this? What can be done and what cannot?

 

I am willing to become a tester if the developers need one.

 

Thank you very much

 

fborot

Link to comment
Share on other sites

Hi,

 

read through all of this, very nice contribution 'zilla ;)

 

 

for previous versions, there were 10 step, stage by stage instructions on how to create a new shop.

 

Is it possible to supply this for version 1.4?

 

 

Just installed it, over a vanilla MS2 install - and it all seems to work, but I'm not sure how to reference my different stores

 

I have created three stores, one called, DVDs, one Hardware and the other softare, and the products from the standard OSC install are allocated to those stores.

 

My main store shows the DVD's, how do I see the stores for hardware and software (its not the store URL is it, as that doesn;t do anything yet)

 

 

I am sure the step by step instructions would help me, and probably others using this. :D

Link to comment
Share on other sites

for previous versions, there were 10 step, stage by stage instructions on how to create a new shop.

 

Is it possible to supply this for version 1.4?

I have been playing with this contribution, and documenting my process.

 

I have been trying to evaluate this, by setting up a vanilla OSC installation, and then using this contribution to make 3 stores, DVDs, Hardware and Software.

 

I can setup the stores OK, and allocate products, but can only ever seem to access the "super admin" admin panel, not the store specific admin.

 

Process used shown below (copied from my notes in the admin forums of my site)

 

1 - Install vanilla version of OSCommerce

 

2 - Install the Hobbzilla Multi Store contribution

 

this was a piece of piss, very painless install.

 

Copy the files over and run the SQL update script.

 

 

Once it is all installed, we have one store, with no products allocated to it.

 

I am going to setup three stores

 

- DVDs

- Hardware

- Software

 

with the default products from the OSC install in them.

 

The directory structure I used is

 

1 - a sub-domain called mall.lexusownersclub.com, with the vanilla OSC install in a folder called catalog.

 

2 - each of the stores will be installed here, into a folder of the store name, so we will have

 

mall.loc.com/dvds ==> dvd store

mall.loc.com/software ==> software store

mall.hardware.com ==> hardware store

 

a nice index.htm with links to these folders will give us a nice 'mall front'.

 

As admins of the main store, we will see all customers and orders.

 

Customers will be shared across all stores.

 

To create a new store.

 

Example below is to create DVD store, in a folder called mall.loc.com/dvds/ using a database configuration table called dvds.

 

1 - in the main store (mall.loc.com/catalog/admin/), click Stores, and insert a new store. Give the store and name, and a database table name (I am just using descriptive dvds etc type names)

 

2 - download the catalog folder from the server (mall.loc.com/catalog). This is the "standard" configuration for a working store, we will change this so the config all points to a new folder (called eg dvds), which is configured for the DVD store.

 

Change ;

 

- /includes/configure.php

 

from

  define('HTTP_COOKIE_PATH', '/catalog/');

 

to

  define('HTTP_COOKIE_PATH', '/dvds/');

 

 

from

 

 

  define('DIR_WS_HTTP_CATALOG', '/catalog/');

 

to

  define('DIR_WS_HTTP_CATALOG', '/dvds/');

 

 

from

  define('DIR_FS_CATALOG', '/home/lexusown/public_html/mall/catalog/');

 

to

  define('DIR_FS_CATALOG', '/home/lexusown/public_html/mall/dvds/');

 

 

- /includes/database_tables.php

 

from

  define('TABLE_CONFIGURATION', 'configuration');

 

to

  define('TABLE_CONFIGURATION', 'dvds');

 

 

- /admin/includes/configure.php

 

from

  define('DIR_FS_DOCUMENT_ROOT', '/home/lexusown/public_html/mall/catalog/');

 

to

  define('DIR_FS_DOCUMENT_ROOT', '/home/lexusown/public_html/mall/dvds/');

 

 

from

  define('DIR_WS_ADMIN', '/catalog/admin/');

 

to

  define('DIR_WS_ADMIN', '/dvds/admin/');

 

from

  define('DIR_FS_ADMIN', '/home/lexusown/public_html/mall/catalog/admin/');

 

to

  define('DIR_FS_ADMIN', '/home/lexusown/public_html/mall/dvds/admin/');

 

from

  define('DIR_WS_CATALOG', '/catalog/');

 

to

  define('DIR_WS_CATALOG', '/dvds/');

 

from

  define('DIR_FS_CATALOG', '/home/lexusown/public_html/mall/catalog/');

 

to

 

  define('DIR_FS_CATALOG', '/home/lexusown/public_html/mall/dvds/');

 

 

note that there is a /admin/includes/database_tables.php, but no edits were made in there, as the database selction is made in application_top.php for the admin tool

 

 

What have I missed?

 

How do I make it so that the admin for store DVDs can only see the DVDs category?

Link to comment
Share on other sites

Anyone willing to give me a little email support?

 

I can not seem to load the files correctly...

I believe that I installed the osCommerce correctly,

although when I add the Multistore folders, it is that

it has no effect.

 

I installed the new CATALOG folder over the

domain.com/catalog folder

 

And I have installed the ADMIN folder both

as a peer to CATALOG

and another time inside the domain.com/catalog folder

 

I ran the update.sql file and it "successfully

completed" the 16 changes. I used the IpowerWeb's phpMyAdmin 2.4.0 SQL tab and the "Or Location of the textfile :" option to select the update.sql file

 

BUT, I see no differences on the domain.com/catalog/admin page.

 

I see no way to add any additional stores.

 

Incidently on the Admin page, I seem to also be missing an option.

Tools

Backup, , Files (Something missing between the commas?)

 

Can some possibly talk me through adding the contrib correctly? I can not seem to figure out where I am going wrong here.

 

 

Boyd

boydness1000 AT yahoo DOT com

Link to comment
Share on other sites

Hi Ryan,

 

You seem to have expended a huge amount of effort here - congratulations and well done. I have read through all of the posts that others have made, and I think your contribution does everything I need. Before I go ahead and install it, I thought it would be wisest to check with you if I am indeed correct! This is the situation:

  • I have access to one MySQL database server (and no more).
     
  • I have access to multiple hosting accounts that can all access that single MySQL database (PHP enabled).
     
  • I currently have a European osCommerce store with products in Euros (EUR).
     
  • I want to have a UK store with products in ? British Sterling (GBP) as well (and in the future USD too). Each store basically sells the same products, but the pricing models are different depending on the currency, so I can't use the standard osCommerce currency exchange rate system! :( I do not want to have pricing based on a currency conversion, but individually set by the administrator in the different stores. Hence at the moment with the standard osCommerce install - if I just add the UK GBP currency to my osCommerce store I purely get the UK price based on the currency conversion rate (~1.6EUR), so my UK prices end up like "?34.17"! I want to be able to set the EUR price at EUR 80.00 and the GBP at say ?55.00. Even though it isn't particularly fair to the buyer in GBP in this example, the pricing looks better!
     
  • All stores would be administrated by me, and me alone, so a central admin is fine.
     
  • Each store can have different product records. I don't mind entering duplicates, but it is important that a UK priced product does not appear on a EUR site. I don't want to provide support for multiple currencies individually on each site as a result.

My thoughts are thus:

  • Install your contribution, and
  • Leave EUR_STORE as only supporting Euros, and
  • Add UK_STORE and set the currency to be GBP, and
  • Bob's my uncle, and I'm a happy chappie!

Thoughts?

 

Regards

 

Ben

Link to comment
Share on other sites

  • 2 weeks later...

Hi Ryan,

 

after a long time I took a look at your contribution again and I saw that now it works with the admin login. Great, thank you, it is wonderful, even if it is very tricky to implement into a heavily mofidied shop.

 

I was wondering if there are plans to allocate different prices to different shops as well?

 

Thx, Michael

Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)

Link to comment
Share on other sites

Is ist now possible to create shop without copying the whole catalog to a new directory ?

 

The default shop is always....www.mystore.com/catalog/index.php

 

couldn`t it be done to call new shop in this way:

 

www.mystore.com/catalog/index.php?test

 

 

....and there is only one single catalog/admin-folder for all shops ?

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

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