Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Incomplete URL in "Order Update" Email


Marc_J

Recommended Posts

When orders are placed, my "Order Process" emails (to the customer) go out fine, for example: -

 

Store_Name

------------------------------------------------------

Order Number: 6

Detailed Invoice: http://mydomain.com/catalog/account_histor....php?order_id=6

Date Ordered: Sunday 06 February, 2005

 

Products

------------------------------------------------------

1 x Master Cylinder (MS7) = ?48.60

------------------------------------------------------

Sub-Total: ?48.60

etc...

 

But, when I change the order status from "Pending" to, say, "Delivered" and keep the "Notify Customer" box ticked, the resulting email to the customer cuts the domain from the "Detailed Invoice" URL, for example: -

 

Store_Name

------------------------------------------------------

Order Number: 6

Detailed Invoice: /catalog/account_history_info.php?order_id=6

Date Ordered: Sunday 06 February, 2005

 

The comments for your order are

 

Your order has been updated to the following status.

 

New status: Delivered

etc...

 

Is this a known problem, and is there a fix?

Link to comment
Share on other sites

i wonder where can can change that template too. i don't like the setup lines and want to and more info. what file do i have to change?

 

I think my problem lies in catalog\admin\orders.php around line 50: -

 

            $email = STORE_NAME . "\n" . 
                    EMAIL_SEPARATOR . "\n" .
                    EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" .
                    EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" .
                    EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" .

 

Although I'm not sure what to change - changing it to the variables used in catalog\checkout_process.php (around line 222): -

 

                 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .

 

gives strange results!

Link to comment
Share on other sites

Apologies for bumping this again, but I'm still no further forward with this....is no-one else having this problem?

 

 

 

Look for the "tep_catalog_href_link" fuction in admin/includes/functions/html_output.php

 

This should give you some ideas - looks like your HTTPS_CATALOG_SERVER and HTTP_CATALOG_SERVER are different. Is one blank in your configuration file (configure.php)?

Link to comment
Share on other sites

Here's my /catalog/includes/configure.php :-

 

<?php
/*
 $Id: configure.php,v 1.12 2002/06/16 22:11:53 harley_vb Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://mydomain.com');
define('HTTPS_SERVER', 'https://mydomain.com');
 define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG', '/catalog/');


 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '**********');
define('DB_SERVER_PASSWORD', '**********');
define('DB_DATABASE', '**********');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

And my \catalog\admin\includes\configure.php :-

 

<?php
/*
 $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
define('HTTP_SERVER', 'http://mydomain.com');
 define('HTTP_CATALOG_SERVER', '');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
define('DIR_WS_ADMIN', '/catalog/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '**********');
define('DB_SERVER_PASSWORD', '**********');
define('DB_DATABASE', '**********');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

 

As you can see, both HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER are blank. As far as I know, this hasn't been changed since install with no tweaking, so I imagine the problem I'm having is a common one!

Link to comment
Share on other sites

Marc_J,

You should use the same settings in both configure.php files:

 

/catalog/includes/configure.php

/catalog/admin/includes/configure.php,

 

define('HTTP_CATALOG_SERVER', 'http://mydomain.com');

define('HTTPS_CATALOG_SERVER', 'https://mydomain.com');

 

Regards,

EricK

Link to comment
Share on other sites

Thanks EricK,

 

I could only find these definitions in /catalog/admin/includes/configure.php, and found that defining only the HTTP worked for me, i.e.: -

 

  define('HTTP_CATALOG_SERVER', 'http://mydomain.com');
 define('HTTPS_CATALOG_SERVER', '');

 

Although I don't imagine it would have done any harm filling in the HTTPS one, too, I was trying one at a time and it worked first time as above.

 

Thanks again :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...