Guest Posted October 19, 2008 Posted October 19, 2008 When the customer places the order a link to the order page is inserted into the email, for example: http://mysite.com/catalog/account_history_...p?order_id=2157 This is fine. When I upgrade an order however this link is being inserted into the emails that the customers recieve about the upgrade, instead of the right one: http://mysite.com/catalog/admin/account_hi...p?order_id=2157 Notice the /admin/ part? this means the customers will be shown the admin login screen, which is obviously bad as it confuses them. So, I guess it's a matter of just removing a word in the code and the customers will see the correct path every time.. I just dont know what file to look in. Thanks in advance.
germ Posted October 20, 2008 Posted October 20, 2008 The code in /admin/orders.php uses: tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') Then looking in /admin/includes/functions/html_output.php at that function: function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($connection == 'NONSSL') { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL_CATALOG == 'true') { $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link .= $page; } else { $link .= $page . '?' . $parameters; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; } It uses: HTTP_CATALOG_SERVER DIR_WS_CATALOG From your /admin/includes/configure.php file I'd guess the last one (DIR_WS_CATALOG) has the admin path in it when it shouldn't. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 20, 2008 Posted October 20, 2008 The code in /admin/orders.php uses: tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') Then looking in /admin/includes/functions/html_output.php at that function: function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') { if ($connection == 'NONSSL') { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL_CATALOG == 'true') { $link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>'); } if ($parameters == '') { $link .= $page; } else { $link .= $page . '?' . $parameters; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); return $link; } It uses: HTTP_CATALOG_SERVER DIR_WS_CATALOG From your /admin/includes/configure.php file I'd guess the last one (DIR_WS_CATALOG) has the admin path in it when it shouldn't. Thanks. While this did clarify what the problem is.. I am still a bit confused what I need to edit. are you saying i need to edit the configure.php file in my admin/includes?
germ Posted October 20, 2008 Posted October 20, 2008 What do you have for this line: define('DIR_WS_CATALOG', '/catalog/'); In your /admin/includes/configure.php file? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 20, 2008 Posted October 20, 2008 What do you have for this line: define('DIR_WS_CATALOG', '/catalog/'); In your /admin/includes/configure.php file? :unsure: /catalog/
germ Posted October 20, 2008 Posted October 20, 2008 Then the only two places left to look would be: FILENAME_CATALOG_ACCOUNT_HISTORY_INFO In /admin/includes/filenames.php Or: HTTP_CATALOG_SERVER In /admin/incides/configure.php Unless you have "deviant code".... :o If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 20, 2008 Posted October 20, 2008 Nothing looks messed up to me. I am talking to my partner.. he may have fixed it already. If not, is there anything we can do? Thanks in advance.
germ Posted October 20, 2008 Posted October 20, 2008 If not, is there anything we can do? Find it and fix it. I've given you the code to look at. The only other place not mentioned to look might be in /admin/includes/local/configure.php Some installs have a configure file there and some don't. Anything in there trumps the normal configure file. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.