osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Multi-Stores shop system for OSCMAX

This is a discussion on Multi-Stores shop system for OSCMAX within the osCMax Projects Discussion forums, part of the osCMax v2.0 Forums category; A new project_project entry has been added: Multi-Stores shop system for OSCMAX Version 1.4 ============= These modifications allow you to ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax Projects Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack (2) Thread Tools
 
Old 04-26-2007, 09:11 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,665
Thanks: 2
Thanked 93 Times in 79 Posts
Thanks: 2
Thanked 93 Times in 79 Posts
Rep Power: 12
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
Default Multi-Stores shop system for OSCMAX

A new project_project entry has been added:

Multi-Stores shop system for OSCMAX

Quote:
Version 1.4
=============
These modifications allow you to assign specific products and categories to multiple stores that you define in the administration panel. The products and categories
__________________
JPF - osCMax Fourm Moderator
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 4 Users Say Thank You to jpf For This Useful Post:
ALElder (04-27-2007), altenter (05-18-2007), michael_s (04-26-2007), MindTwist (04-10-2008)
  #91  
Old 04-18-2008, 08:13 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

You can check out some of my previous posts to see some things that do not come with the MS installation. I have not posted them because I enjoy talking with myself, but because I know that one month after I have not done anything else on MS, I won't remember any more what I did or did not, and because the info can be helpful for those that have to try it on later.

Maybe we will eventually find someone who feels like doing the installation on top of a clean OSCMAX installation and trying ALL the features that should be on a full Multi Stores installation...

/includes/modules/xsell_products.php - I do not think you want customers on store 2 seeing that people who have purchased product X also purchased product Y which you have active on store 1, but not on store 2

/templates/fallback/content/catalog_products_with_images.tpl.php - Same here, by default it will show all products without checking if they are active or not on the current store

/templates/fallback/content/sitemap.tpl.php - Same as above, but with categories instead of products

/includes/modules/default_specials.php - On main page you will see specials not just on the current store, but on all stores

Search, I kinda remember search was also giving me back results of inactive products on the current store... and the new products module was showing me several times the same product if it had a special price (product normal price 10EUR, special price on store1 = 8EUR, special price on store 2 = 6EUR, it could show like a new product with any of the prices, and you could even see the 3 at the same time).

My installation would not be useful to create a contribution that would work for anyone out of the box. I still have some broken things I know of which I do not need fixing because they don't bother me (special price on store 1 will show on two places on store 2, but I do not care because when I create a special price for a product, it will be active on all stores).
__________________
MindTwist of Twisted Reality and Twisted Tienda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #92  
Old 04-18-2008, 08:22 AM
habelson's Avatar
Member
 
Join Date: Sep 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
habelson is on a distinguished road
Default Re: Multi-Stores shop system for OSCMAX

as an aside, I have also modified it so that you could choose which banners are shown on which stores, similar to how you do that with products.

Perhaps this summer I can find the time to work on this as a complete contribution with fixes. But I don't use all of these features to know where the problems are so maybe you could help me ou tin that way. You have done a good job documenting those issues in this thread.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #93  
Old 04-18-2008, 08:57 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

hehe see, I do not use banners on my site, so if there was already MS support for banners on the contribution and it was broken from the beginning, I would never even find out...

There are some more things I would like to add support for MS on my site, like "articles" and I might use in the future banners and affiliates, but I will be happy enough when all the basics are up and running.
__________________
MindTwist of Twisted Reality and Twisted Tienda
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #94  
Old 04-18-2008, 09:46 AM
habelson's Avatar
Member
 
Join Date: Sep 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
habelson is on a distinguished road
Default Re: Multi-Stores shop system for OSCMAX

I think it would also be nice for newsletters and the customer e-mail tool to tie into the multi-store mod. For instance it would be nice to send a newsletter to all customers from a particular store. Perhaps some of these should be optional and there should be a section in the admin panel to control which of these features are enabled for multi-store... that would be an interesting addition to the mod
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #95  
Old 05-13-2008, 12:24 PM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

Multi-Stores is so much fun. Just felt like coming back and leting you know how much I enjoy it, I just had to adapt 3 contributions for it, and I even learnt some SQL along the way hehe...

I installed a PDF catalog/pricelist creator, which of course needed to be adapted for Multi-Stores, otherwise it was creating the catalog for all the products, no matter if they were active or not on the store. It also needed to create catalogs with diffrenet names, so each store can have its own PDF catalog.

I also needed to change a couple contributions for price comparison web sites, since I was submiting to them XML feeds on all my products. Now if I ever submit the products on the secondary stores, every XML feed will only have the products that belong to that store.

So much enjoying OSCMAX today, so much fun with Multi-Stores...!! I think I still had something broken from the default OSCMAX installation, sitemap is showing all categories even if they are not active on that store I think. Gonna check out that one right now!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #96  
Old 08-09-2008, 03:33 PM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

So, a new contribution, and more Multi Stores adaptation.

I installed a fairly easy contrib, "Featured products", and I bumped on a silly problem, SQL query (as usual, with MS). I modified the query so that it only shows featured products if they are active on the current store, but it is showing me the special prices anyway (even if that special price is not active on the current store)

When I try to use the table SPECIALS_TO_STORES on the query, what I end up with is the query returning me only the featured items active on the store, AND with special price.

So, since I have a query that returns all featured items (but with wrong special prices), and another one that returns featured items with special price, I take the first query, remove all specials, and then add them from the second query.

Now, while this is working I know it is not the way it should be done. I am adding unnecessary code, unnedded queries, a while that should not be needed, etc., so if someone can help me a bit with this SQL queries, that would be great.

This is the original query (for information only):

Code:
    $featured_products_query = tep_db_query("select p.products_id, 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_FEATURED . " f on p.products_id = f.products_id
    where p.products_status = '1' and f.status = '1'
    order by rand($mtm)
    DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
This is the query that gives me only products active on the current store. It does take special prices on those products, without checking if the special price is active on the current store:
Code:
    $featured_products_query = tep_db_query("select p.products_id, 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_PRODUCTS_TO_STORES . " p2s on p.products_id = p2s.products_id
    left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
    left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
    where p2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and f.status = '1'
    order by rand($mtm)
    DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
This is the query that returns me ONLY the products that are active on the current store, and that have a special price active on the current store.
Code:
    $featured_products_query2 = tep_db_query("select p.products_id, 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_FEATURED . " f on p.products_id = f.products_id
    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
    where s.specials_id = s2s.specials_id and s2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and f.status = '1'
    order by products_id
    ");
If anyone can lend me a hand on merging this queries so I only need one of them I'd be grateful forever, since my SQL knowledge can't help me any more than this...

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #97  
Old 08-09-2008, 04:51 PM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

Guess I give up for today. Maybe I should be taking some SQL course hehe... The closest I have been able to get is:

Code:
    $featured_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, NULL) as specstat,
    IF(s.status = '1' AND s2s.stores_id = '" . STORES_ID . "', s.specials_new_products_price, NULL) as specials_new_products_price,
    p.products_price
    from " . TABLE_PRODUCTS . " p
    left join " . TABLE_PRODUCTS_TO_STORES . " p2s on p.products_id = p2s.products_id
    left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
    left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
    right join " . TABLE_SPECIALS_TO_STORES . " s2s on s.specials_id = s2s.specials_id
    where p2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and f.status = '1'
    order by rand($mtm)
    DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
Which shows me ok the products with and without special price... But with this query I get the products with special price TWICE, one with normal price, one with special price. Bleh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #98  
Old 08-09-2008, 04:58 PM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

It is not a good idea to try to THINK at 3am when you are falling asleep. The previous query wasn't so bad, but when I was comparing the SPECIALS_TO_STORES table I was only looking for an active special, and not an active special on a given store.

I had to change on s.specials_id = s2s.specials_id for on s.specials_id = s2s.specials_id and s2s.stores_id = '" . STORES_ID . "' and everything seems to be fine now.

To bed now, and I will check out tomorrow morning if everything is ok!

Code:
    $featured_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, NULL) as specstat,
    IF(s.status = '1' AND s2s.stores_id = '" . STORES_ID . "', s.specials_new_products_price, NULL) as specials_new_products_price,
    p.products_price
    from " . TABLE_PRODUCTS . " p
    left join " . TABLE_PRODUCTS_TO_STORES . " p2s on p.products_id = p2s.products_id
    left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id
    left join " . TABLE_FEATURED . " f on p.products_id = f.products_id
    left join " . TABLE_SPECIALS_TO_STORES . " s2s on s.specials_id = s2s.specials_id and s2s.stores_id = '" . STORES_ID . "'
    where p2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and f.status = '1'
    order by rand($mtm)
    DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #99  
Old 08-21-2008, 08:50 AM
MindTwist's Avatar
Active Member
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 338
Thanks: 9
Thanked 26 Times in 25 Posts
Rep Power: 3
MindTwist will become famous soon enoughMindTwist will become famous soon enough
Default Re: Multi-Stores shop system for OSCMAX

Quote:
Originally Posted by habelson View Post
To answer the question of how to do symbolic links in php, it is as simple as using the function symlink(). I don't recall the order of the paramters, but you should be easily able to look it up.

Just a note about symbolic links that I learned recently. Many FTP servers do not support the use of symlinks very well. This means if you create a site with simlinks and then want to connect to it with FTP you may have problems. This is completely dependant on your host. If symlinks is not supported by your FTP server, than you are just out of luck. I tried using hard links, but that doesn't eliminate the situation where if you make a change you have to upload the change to each individual store.
Adding some info on this thread, yeah, I had to use the symlink function to make links between the stores, but I basically have only symlinked two dirs, /includes and /templates. When I make a small change on the main store, it is also live on the other stores.

PHP: symlink - Manual

I have modified my /public_html/includes/configure.php to get the config information from ../../config/configurecatalog.php , that way I can have the /includes folders exactly the same on all stores. The configure file is stored outside that directory. On database_tables.php I have a prefix that depends on the HTTP_SERVER, so I can also have the exact same database_tables.php file on all stores.

But I have not been able to symlink the /admin folder, because it will load the admin section from the main store. I have the real files in:
/user/store1/public_html/admin/
And the following is really a symlink that points to the previous dir:
/user/store2/public_html/admin/

But, when I try to access www.store2.com/admin/ , if I put an "echo getcwd();" on index.php, I get /user/store1/public_html/admin/ , so when it loads the config from ../../config/configurecatalog.php it is actually reading it from /user/store1/config/ , and not from /user/store2/config/ which is what I would like it to do

Any hints here would be great, otherwise for now I just need to have a real copy of every /admin folder in every store.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #100  
Old 09-17-2008, 04:26 PM
Lurker
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
westm003 is on a distinguished road
Red face Re: Multi-Stores shop system for OSCMAX

Hi its now 02:30 and i am not able to get search to work...

whatever i do on my clean install with fix:

i have the error described i tried everything but cannot resolve it Would someone mind sharing the necesary files with me please?!

my email: saxofoon[@]arjanwestmaas.nl

Tnx a lot i advance!!!!

(i have a clean install)


errors:
1066 - Not unique table/alias: 'c'
and
1054 - Unknown column 's.specials_id' in 'on clause'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.oscmax.com/forums/oscmax-projects-discussion/8739-multi-stores-shop-system-oscmax.html

Posted By For Type Date
multi-store on osc-max by catros - The Web Plate - Webmasters Forums This thread Refback 02-20-2008 10:41 PM
Alice - Rechercher This thread Refback 02-09-2008 12:27 AM

Similar Threads

Thread Thread Starter Forum Replies Last Post
Multi-Stores multiple shop system michael_s New osCommerce Contributions 0 02-03-2007 10:10 AM
Multi shop store module for oscmax clauska osCMax v2 Customization/Mods 1 10-12-2006 06:52 PM
Multi Stores contrib in OsC Max-Is it possible? InaFlap osCMax v2 Customization/Mods 0 08-05-2006 03:11 PM
multi-stores okatoma osCMax v1.7 General Mods Discussion 3 02-25-2004 07:58 AM


All times are GMT -8. The time now is 05:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax