Forums / All Other Contributions/Addons / MultiSite Module Support Thread

MultiSite Module Support Thread

Started by gerome on 23 Apr 2007, 10:24 AM · Views: 581,870

Results 641 to 660 of 2,247
17 Dec 2008, 1:41 PM
#641
adnanrana avatar

adnanrana

New Zenner

Join Date:
Jun 2008
Posts:
16
Plugin Contributions:
0

MultiSite Module Support Thread

adnanrana:

I have a problem with the "All Products" link on the left hand side in the categories side box. I have the module installed on two different sites, and the problem exists on both. Can someone please have a look at it for me.

http://www.keyfitness.co.uk
http://www.fitnessmall.co.uk

They are both completely seperate sites with seperate databases and hosting companies.

Thanks
Adnan

Can someone help me with this please.

18 Dec 2008, 5:09 PM
#642
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

adnanrana:

Can someone help me with this please.Looks like you are experiencing problems loading your tpl_modules_products_all_listing.php

It may be missing or corrupt. There should be a default copy in your template_default/templates if you make any changes to it, save it in your YOUR_TEMPLATE/templates folder.

Obviously change the name of YOUR_TEMPLATE to the name of your custom template folder.
JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

19 Dec 2008, 12:21 PM
#643
adnanrana avatar

adnanrana

New Zenner

Join Date:
Jun 2008
Posts:
16
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Stuff4Toys:

Looks like you are experiencing problems loading your tpl_modules_products_all_listing.php

It may be missing or corrupt. There should be a default copy in your template_default/templates if you make any changes to it, save it in your YOUR_TEMPLATE/templates folder.

Obviously change the name of YOUR_TEMPLATE to the name of your custom template folder.
JOhn ><>

Thanks for your response. I have just tried replacing tpl_modules_products_all_listing.php file with several different copies (including one from one of my working sites that doesn't have multisite module), but still not working.

I have just created a fresh new installation of Zen Cart at fitnesstrade.co.uk, and installed the multisite module (followed instructions carefully), and have exactly the same problem.

Please let me know if you need my ftp and admin logon details.

Thanks.

19 Dec 2008, 8:16 PM
#644
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

I created a fresh 1.3.8a installation on an upgraded 1.3.7 database.

The two sites I am setting up are #1 www.liberty-flag.com and #2 www.americasflag.com and so google doesn't catch on the test stores are in a folder called /xstore/

I created a practise template using the iC-AcadameV1.2F template from ichooze.com and set it up with TPP, IH2 and Hooverbox3 and it worked like a charm all the way through checkout.

I added the multisite add and modified files and setup my configure.php and the appropriate _config.php files. The first site is using the Academe template and the second is using the stock, unmodified classic with IH2.

Both sites load the home page index.php as advertised. sideboxes are appropriate, categories and product listings are correct.

The first site #1 will display every page on the site until you checkout and get to /xstore/index.php?main_page=checkout_shipping&zenid=647xxxxx I get a blank page.

The second site #2 will display every page on the site until you try and view a product's info or reviews or try and checkout.

Product reviews is blank
/xstore/index.php?main_page=product_reviews_info&products_id=1&reviews_id=1

Product info is blank
/xstore/index.php?main_page=product_info&cPath=2&products_id=3889

it will add a product to the shopping cart ( I have this site temporarly set up with no ssl) when you checkout and get to
/xstore/index.php?main_page=checkout_shipping
all I get is a blank page.

Might be a similar problems as "adnanrana" mentioned above, but I am at a loss. Site #1 worked fine untill I added Multisite.

JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

19 Dec 2008, 8:23 PM
#645
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Site #2's product info page problem was a problem loading Hoverbox3, I uploaded the hoverbox files to the classic template and all is well.

it still will not checkout. /xstore/index.php?main_page=checkout_shipping only gives a Blank Page just like site #1
JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

19 Dec 2008, 8:46 PM
#646
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Seems as if it's balking when it gets to
/xstore/includes/modules/pages/checkout_shipping/header_php.php

Like it's confused and doesn't know which shop to check out.
The source html output for the checkout_shipping page looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>
```and stops processing there.  I double checked the above file and it does exist in the path shown.
 
Am I missing a file?
JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

23 Dec 2008, 4:22 PM
#647
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Does anyone have a solution or thoughts of help for my issue? I double checked every step of the installation procedures on http://www.medea.co.uk/dev/multisite_instructions_0.4.html
Steps 1 - 6. Double checked that each file was in the appropriate place. Created the template folders for each of the 2 templates.

and still, the checkout process is stopping at index.php?main_page=checkout_shipping on BOTH templates.

What file(s) is this calling? Checkout worked before setting up multi-site???

Any and all thoughts will be appreciated.
JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

24 Dec 2008, 8:02 PM
#648
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: MultiSite Module Support Thread

Beleive it or not - the whole issue here was my "table rate shipping" module. I set it to false and tried to checkout and ZINGO it works. Turned the module back on and it still works.
:clap:
JOhn ><>

Newest Site: ChargerPros - Stuff4Toys

25 Dec 2008, 8:20 PM
#649
adnanrana avatar

adnanrana

New Zenner

Join Date:
Jun 2008
Posts:
16
Plugin Contributions:
0

Re: MultiSite Module Support Thread

adnanrana:

Thanks for your response. I have just tried replacing tpl_modules_products_all_listing.php file with several different copies (including one from one of my working sites that doesn't have multisite module), but still not working.

I have just created a fresh new installation of Zen Cart at fitnesstrade.co.uk, and installed the multisite module (followed instructions carefully), and have exactly the same problem.

Please let me know if you need my ftp and admin logon details.

Thanks.

Please help me with this.

28 Dec 2008, 6:51 PM
#650
jkovar avatar

jkovar

New Zenner

Join Date:
Dec 2008
Location:
Cypress, Texas
Posts:
4
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I was wondering if the multisite module would work for my needs. I maintain sites for my clients. I need each site to be tied to the clients Paypal account. (no cross vendor orders).

Can I have a seperate paypal account tied to each sites cart/checkout procedure?

Thanks,

29 Dec 2008, 1:45 PM
#651
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Re: MultiSite Module Support Thread

jkovar,
You should be able to do this. You'll just have to set the appropriate variables for each store in each store's config_sites config file.

Probably want to set these:
define('MODULE_PAYMENT_PAYPAL_BUSINESS_ID',''); //Business ID
define('MODULE_PAYMENT_PAYPAL_PDTTOKEN',''); //PDT Token (Payment Data Transfer)

and whatever else...

6 Jan 2009, 9:21 PM
#652
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Hi there.. just want you to know that this module is great. We have set up a client with 15 sites running off 1 db.

Happy New year to all

Best Regards,

Mendweb - Owner / Programmer
mendweb.com

22 stores and counting! Ive been zenned.

6 Jan 2009, 10:39 PM
#653
motodelta avatar

motodelta

Zen Follower

Join Date:
Jan 2006
Posts:
119
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Just curious, what are you guys doing about order status update e-mails? My admin status update emails do not come out with the site-name on them.

7 Jan 2009, 1:56 PM
#654
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Re: MultiSite Module Support Thread

MotoDelta,
I have it working in Multisite, and I think it's all "stock" code. Try this:
Go to :
includes/config_sites/<store config file>

add this line to that config file:
define('STORE_NAME','<YOUR STORE NAME>');

Submit a test order and see if your email came through as:
Order Confirmation from <YOUR STORE NAME>

7 Jan 2009, 3:03 PM
#655
motodelta avatar

motodelta

Zen Follower

Join Date:
Jan 2006
Posts:
119
Plugin Contributions:
0

Re: MultiSite Module Support Thread

I could see this working if when you entered the admin backend you entered using the URL of the store sending the update. However if you have many sites managed on Multisite it would be quite inconventient to have to logout and log back in to set the status of that stores orders. We will get orders from 20 sites in a day you know?

I managed to change the order status e-mail to include the site name in the "from" email address by pulling it from the order status query, but the invoice URL in the email itself contains the common site directory link rather than the URL of the store that received the order.

(FYI I have STORE_NAME defined in the config files.)

7 Jan 2009, 4:32 PM
#656
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Re: MultiSite Module Support Thread

MotoDelta,
Sorry, apparently I didn't read your email very well. I was thinking order confirmation emails, not update emails.

Good point! I never even tested the update emails since I have a script to automate the tracking emails (so I know those emails have the correct store information).

I'll fix it and post my solution soon.

7 Jan 2009, 4:59 PM
#657
motodelta avatar

motodelta

Zen Follower

Join Date:
Jan 2006
Posts:
119
Plugin Contributions:
0

Re: MultiSite Module Support Thread

Wow thanks!

We update orders with a tracking number manually. It's a pain but the suppliers do not have automated tracking feeds as of yet.

7 Jan 2009, 8:56 PM
#658
jacka avatar

jacka

Zen Follower

Join Date:
Nov 2007
Location:
Dallas, Texas USA
Posts:
180
Plugin Contributions:
0

Re: MultiSite Module Support Thread

This Multisite mod may be what I need, but just to make sure --

I want to have one cart with the same content, but branded for each of two domains, depending on the domain the visitor is coming from.

Will this mod provide that?

Detail: A plumbing company selling plumbing parts to the trade also has a retail plumbing showroom division that sells same plumbing parts and faucets/fixtures. Each entity has its own web site, but they both can sell the same products. Only difference would be the appearance of the skin --- colors, logos, font maybe, etc.--for each.

Make sense?

These sites are NOT on a dedicated server at this time but that is possible.

Thanks much.

7 Jan 2009, 10:40 PM
#659
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Re: MultiSite Module Support Thread

MotoDelta,
Ok here's what I did. It works for me.

Create a file in your admin folder called "multisite_order_settings.php". You have to change YOUR_DOMAIN.COM to your domain name of course. So for "mystore.example.com" you would just use example.com. If you look through this the idea is that it should accomodate one domain with a bunch of subdomains *.example.com and if, like me, you have some FQDN's that you use with Multisite ex. https://www.mystore.com

<?php
if (isset($_GET['oID'])) {
    $oID = zen_db_prepare_input(trim($_GET['oID']));
    $domain_name = "YOUR_DOMAIN.COM";

    $orders = $db->Execute("select order_site from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
    if ($orders->RecordCount() > 0) 
    {
        $order_template = $orders->fields['order_site'];
        $config_folder = DIR_FS_CATALOG . DIR_WS_INCLUDES . 'config_sites/';
        $subdomain = $order_template .".". $domain_name ."_config.php";
        $dotcom = "www.". $order_template . ".com_config.php";
        if (file_exists($config_folder . $subdomain))
        {   
            include($config_folder . $subdomain); 
            $store_url = $order_template .".". $domain_name;
            $store_name = $store_url;
        }
        else if (file_exists($config_folder . $dotcom))
        {   
            include($config_folder . $dotcom); 
            $store_url = "www.". $order_template .".com";
            $store_name = $store_url;
        }
        else
        {   
            echo "Error pulling site config file.  Is the config file using a non-standard domain name or filename? Can't find:<br>"; 
            echo $config_folder . $subdomain . "<br>";
            echo $config_folder . $dotcom. "<br>";
        }
        $invoice_link = "https://". $store_url . DIR_WS_HTTPS_CATALOG . "index.php?main_page=account_history_info&order_id=". (int)$oID ."\n\n"; 
        $store_image =  "http://". $store_url . DIR_WS_HTTPS_CATALOG . DIR_WS_INCLUDES . "templates/". $order_template . "/images/email_header.gif"; 
        $email_from_name = EMAIL_FROM;
        $email_from_name = $store_url;
    }
}
?>
```I'm kinda going for a config_sites type config file here, but of course it's completely based on the order id instead of the domain your visiting.  As you can see there are some variables being set here that you can control.  Set them to whatever applies for you.  For example the email_header.gif image is a naming convention I use, so you may just use logo.gif.

Then include that file from admin/orders.php.  Make sure it's after the other require/include statements
```php
  
  require("multisite_order_settings.php");
```finally look for the email code in orders.php starting with this:
```php
        //send emails
          $message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
etc etc...
```replace it with this:
```php
          //send emails
          $message = $store_name . "\n" . EMAIL_SEPARATOR . "\n" .
          EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
          EMAIL_TEXT_INVOICE_URL . ' ' . $invoice_link . "\n\n" .
          EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
          strip_tags($notify_comments) .
          EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
          EMAIL_TEXT_STATUS_PLEASE_REPLY;

          $html_msg['EMAIL_CUSTOMERS_NAME']    = $check_status->fields['customers_name'];
          $html_msg['EMAIL_STORE_NAME'] = $store_name;
          $html_msg['EMAIL_HEADER_IMAGE'] = $store_image;
          $html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
          $html_msg['EMAIL_TEXT_INVOICE_URL']  = '<a href="' . $invoice_link .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
          $html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
          $html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
          $html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
          $html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
          $html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
          $html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
          $html_msg['EMAIL_FOOTER_COPYRIGHT'] = 'Copyright (c) ' . date('Y') . ' <a href="http://'. $store_url .'" target="_blank">'. $store_url .'</a>.';

          $customer_notified = '0';
          if (isset($_POST['notify']) && ($_POST['notify'] == 'on')) {
            zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, $email_from_name, $email_from, $html_msg, 'order_status');
```Let me know..
8 Jan 2009, 5:49 AM
#660
motodelta avatar

motodelta

Zen Follower

Join Date:
Jan 2006
Posts:
119
Plugin Contributions:
0

Re: MultiSite Module Support Thread

That's some awesome work there. I don't actually use subdomains so i'll have to tweak it a bit, but it looks like I can just pull out the subdomain code and tweak this. I don't know PHP well enough to write code, but getting good at working with it.

Instead I host multiple domains on our server, then the domain actually points to the common folder.

So https://www.mainsite.com is where the store and code is.

https://www.site1.com
https://www.site2.com ...
https://www.siten.com... all point at the server level to the https://www.mainsite.com directory.

We use a seperate IP address and SSL certificate for each site to ensure search engines don't think we're trying to cheat. Each site is owned by a different proper business entity so it wouldn't be fair if search engines blacklisted them.

Thanks again and I'll let you know how it goes!