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...
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
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.
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>
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.)
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.
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.
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.
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. www.mystore.com
PHP Code:
<?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 Code:
require("multisite_order_settings.php");
finally look for the email code in orders.php starting with this:
PHP Code:
//send emails
$message = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" .
etc etc...
replace it with this:
PHP Code:
//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..
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 www.mainsite.com is where the store and code is.
www.site1.com
www.site2.com ...
www.siten.com... all point at the server level to the 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!