Zen Cart Logo
Forums / General Questions / Frontend for multiple shops

Frontend for multiple shops

Locked

Views: 1,402

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
31 Jan 2007, 11:00 AM
#1
ditman avatar

ditman

New Zenner

Join Date:
Dec 2006
Posts:
8
Plugin Contributions:
0

Frontend for multiple shops

Hi there,

I'm thinking in setting several shops of different stuff on different domains (but in the same machine) and also add some sort of "general frontend" for users to look for stuff in all the shops simultaneously (I know this could be achieved with one only shop, but I'd like to architect this this way :) )

First of all: is there any solution already implemented for this problem so I can have a look at it? This is not to reinvent the wheel, so any help would be greatly appreciated :P

In the case I cannot find anything, I've found some sort of solution involving cool SQL stuff, like views and querying all my databases at once (I like this, and it works well), but I'd like to know...

HOW DOES ZC SEARCH FOR PRODUCTS?? I've seen a lot of PHP code today, but I still cannot find the query to look for stuff (I don't think I need any advanced search, but it would be cool).

I can code the SQL myself, but I'd like to know the official way, so I output relevant results :)

Thanks!

31 Jan 2007, 12:10 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Frontend for multiple shops

You need to be concerned with the way Zen Cart creates and handles sessions. Basically Zen Cart is not modular and you will have a time trying to query differing stores DB's from a common page. Easier to use this frontend to direct to your individual store where all purchases could be made and completed - cross purchasing between stores(DB's) is what is problematic

31 Jan 2007, 1:02 PM
#3
ditman avatar

ditman

New Zenner

Join Date:
Dec 2006
Posts:
8
Plugin Contributions:
0

Re: Frontend for multiple shops

Hi there kobra, that's precisely what I want,

my frontend page will only look for articles and then show links for each article INSIDE its own shop, so shopping and "serious browsing" only happens on each zen-cart (presumably all of them will have their own domain/subdomain and its own database on the server).

I've already solved that problem, as I can create a single "virtual table" with the contents of every shop, but I'd like to know how does zen-cart perform its searchs on its own tables, so I can mimic that with my "virtual tables", and search in the same way.

I hope I explained myself better than before :) (Sorry I write ESL, not English :P)

31 Jan 2007, 1:05 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Frontend for multiple shops

It first creates a session and a link to the DB that is controlled by this session - then search.php can query the now open DB.

31 Jan 2007, 2:52 PM
#5
ditman avatar

ditman

New Zenner

Join Date:
Dec 2006
Posts:
8
Plugin Contributions:
0

Re: Frontend for multiple shops

kobra:

It first creates a session and a link to the DB that is controlled by this session - then search.php can query the now open DB.

The problem is that I haven't found where's the code that reads "SELECT * FROM table WHERE productname = '$form_input'"

Or anything like that. Where is the query that searchs in the database generated? I haven't found that yet :(

31 Jan 2007, 5:49 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Frontend for multiple shops

Depending on where in the process you are i.e navugating to a category page or using the search function ....most of these are defined as functions and could be in the /includes/functions/functions_lookups.php

1 Feb 2007, 8:02 AM
#7
ditman avatar

ditman

New Zenner

Join Date:
Dec 2006
Posts:
8
Plugin Contributions:
0

Re: Frontend for multiple shops

kobra:

Depending on where in the process you are i.e navugating to a category page or using the search function ....most of these are defined as functions and could be in the /includes/functions/functions_lookups.php

Hmm, haved a look there and there's nothing useful (almost every function needs the product_id to perform a lookup)...

The closest I've ever been today is function zen_parse_search_string() located in /includes/functions/functions_general.php but the search string comes prepared from the outside :P I think I'll be doing some "debugging" from this function to see where it gets called.

Thanks to the link to the functions directory tho!

1 Feb 2007, 10:20 AM
#8
ditman avatar

ditman

New Zenner

Join Date:
Dec 2006
Posts:
8
Plugin Contributions:
0

Re: Frontend for multiple shops

Well, I think I found most of it, thanks to this link:

http://www.phpxref.com/xref/zencart/nav.html.gz?_variables/index.html.gz

the file where the variable $listing_sql is initialized is:

includes/modules/pages/advanced_search_result/header_php.php

:P :lol: