2 sites w/quik.cart and same products db?

Stevo

No avatar

2005-08-21 20:33

Hi,
is possible to have 2 or mere different websites running quick.cart with a shared product db?

example: every site has it's own interface (colours, styles, logos, plugins, ecc..), admin page, but point at the same product list.
Like 2 shop with a common warehouse...

Thanx,
Stevo

wewior (OpenSolution)

Avatar: wewior

2005-08-22 08:21

try to change db directories, place that files in some common place and i think both carts will work that way

Stevo

No avatar

2005-08-22 08:54

But this works on 2 separate domains?

Stevo

wewior (OpenSolution)

Avatar: wewior

2005-08-23 09:57

and separate servers?

Stevo

No avatar

2005-09-05 11:14

Yes.. also on 2 separate servers...

wewior (OpenSolution)

Avatar: wewior

2005-09-05 14:10

so how you want to share that files if it will be on separate servers? you can put them in common directory if there is one

kookie

No avatar

2005-09-15 12:22

I have tried something like mentioned above and all works well i seems except one thing: the - with the system - uploaded images do not show... or i might better say: the "system" on the second site, using the standard dbase "thinks" there are no images so shows the OneColumn template i think....

I changed this in general.php ( on "site copy" )

$config['dir_core'] = '../original/core/';
$config['dir_db'] = '../original/db/';
$config['dir_js'] = '../original/js/';
$config['dir_libraries'] = '../original/libraries/';
$config['dir_lang'] = '../original/lang/';
$config['dir_tpl'] = '../original/templates/';
$config['dir_files'] = '../original/files/';
$config['dir_ext'] = '../original/ext/';
$config['dir_products_files'] = '../original/products/';
$config['dir_categories_files']= '../original/categories/';
$config['dir_plugins'] = '../original/plugins/';
$config['dir_template'] = "default/";

But where can i change something so the images will show as they do fine in the "original site" so it does take all the content etc from one dbase :)

kookie

No avatar

2005-09-15 12:30

small correction: $config['dir_tpl'] = '../original/templates/';
should be: $config['dir_tpl'] = 'templates/';

but does not solve the image problem...

kookie

No avatar

2005-09-15 15:22

found it :)

it should be like:
$config['dir_files'] = '../original/files/';
$config['dir_ext'] = '../original/ext/';
$config['dir_products_files'] = '../original/products/';
$config['dir_categories_files']= 'categories/';

the first line here gives the dir for the files so no need to do it again
when specifying the categories_files

julia

No avatar

2005-09-19 19:32

i use the 025 version,
I want to have two shop on the same server and did the following
$config['dir_db'] = '../db/';
$config['dir_files'] = '../files/';

and try 3 different cod for the foto without succes
$config['dir_products_foto'] = 'products/';
or
$config['dir_products_foto'] = '../products/';
or
$config['dir_products_foto'] = '../files/products/';

the images refused to show themself
what is the right way?

wizzud

No avatar

2005-09-20 16:30

To share just the database you only need to change 2 entries in the 'piggy-back' config/general.php file.

Original: http://www.mysite.com/qc25/
Piggy-Back: http://www.mysite.com/qc25_copy/

Lets assume that you create and set-up qc25 (the orignal) properly in the first place. Then you copy qc25 to qc25_copy (the piggy-back) so they both have all the same configuration, same plugins, same templates, same everything.

Now edit qc25_copy/config/general.php (the piggy-back version) and change

$config['dir_db'] = 'db/';
to
$config['dir_db'] = '../qc25/db/';

and

$config['dir_files'] = 'files/';
to
$config['dir_files'] = '../qc25/files/';

Remove (from the piggy-back) qc25_copy/files and qc25_copy/db folders.

Each QC now has its own language files, templates, plugins, core code libraries, etc, but shares the database (content, categories, products and, images).

Be warned that for this to work each QC has to be working off the same file structure so you can't, for example, have productAttributes plugin enabled on one and not the other.

You can take it further if you wish and share core code, libraries code, javascript, plugins (be very careful!), and language, but these may place some restrictions on what differences you can have between the 2 carts.

wizzud

No avatar

2005-09-21 11:20

Caveat:
A lot depends on site permissions and whether you have sub-domains defined for any of your QC instances.

The above example works for side-by-side sub-folders without any sub-domains being defined (ie. access to the shops is via the URLs stated at the top of the article). If access to the Piggy-Back shop were to be changed to a sub-domain, eg http://qc25copy.mysite.com/, then it is unlikely that the Piggy-Back would be able to access all the necessary files in the Original shop. In this case you could try switching them around so that it is the shop with the sub-domain defined for it that holds the database files (ie. the Piggy-Back in my example) and the Original that has the modified config.

The same principle applies in a hierarchical setup, ie where you have you Original shop at www.mysite.com, and your Piggy-Back in a sub-folder (www.mysite.com/shop2/), with a sub-domain defined as shop2.mysite.com. Here you would have to hold the database in the Piggy-Back (shop2) and set the config of the Original to point to 'shop2/db/' and 'shop2/files/'.

juila

No avatar

2005-12-08 19:56

I try to point to different server :
$config['dir_db'] = '../mysite.com/db/';
config['dir_files'] = '../mysite.com/files/';
and i get 17 errors like -
Warning: file(): Unable to access ../mysite.com/db
Warning: file(../mysite.com/db/products.php): failed to open stream: No such file or directory

what wrong, what should i do ?

wizzud

No avatar

2005-12-09 19:23

If you're trying to get at a different server (a) you need to give the full server address because there's no such thing as a relative address between servers, and (b) if you have the relevant permissions to read and write to files on another server you have big security problems!

Back to top
about us | contact