phpCOIN

Forum Rules Help Requests

To offer your services to help others, or to request that someone login to your server to help you directly.

  Reply to this topicStart new topicStart Poll

> Invoice View Url Not Right
nootkan
Posted: January 01, 2017 08:25 pm
Quote Post


Advanced Member
***

Group: Members
Posts: 100
Member No.: 4,017
Joined: October 13, 2009



Just now noticed that when a client receives an email notification about an invoice the url to view the original invoice is wrong.

QUOTE
This email is an automated notification that a new invoice has been issued against your account. This email summarizes the invoice, and the original can be viewed and/or printed by clicking on the following link (requires login):
http://www.mysite.com/mod.php?mod=invoices...ew&invc_id=1091


Should read:

QUOTE
This email is an automated notification that a new invoice has been issued against your account. This email summarizes the invoice, and the original can be viewed and/or printed by clicking on the following link (requires login):
http://www.mysite.com/billing/mod.php?mod=...ew&invc_id=1091


I have this set in my config file:
CODE
# Whether to use full urls or relative paths in links
$_CCFG['USE_FULL_URL']   = 1;


I have also set it to 0 but get the same result.

Any ideas?
PMEmail Poster
Top
lightman
Posted: January 02, 2017 06:09 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



Don't know why it isn't building the link correctly, you might have to hard code the path as necessary, but I have totally forgotten where you need to do this smile.gif


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
nootkan
Posted: January 03, 2017 07:47 pm
Quote Post


Advanced Member
***

Group: Members
Posts: 100
Member No.: 4,017
Joined: October 13, 2009



Thanks Lightman, I figured that is maybe what I have to do. However, I'm not sure what line of code I should be looking for. I've been through all the files but didn't see anything that may give me an idea of what identifies the base url.

This post has been edited by nootkan on January 03, 2017 07:47 pm
PMEmail Poster
Top
nootkan
Posted: January 15, 2017 04:43 pm
Quote Post


Advanced Member
***

Group: Members
Posts: 100
Member No.: 4,017
Joined: October 13, 2009



Because I can't seem to find the right file to hard code this I tried to make changes to the email reminder templates like so:

CODE
You may check the status of your account by clicking on the following link (requires login):
$_MTP/billing/[invc_url]


But the result was this:

CODE

You may check the status of your account by clicking on the following link (requires login):
Array/billing/[invc_url]


Not sure what to try now.
PMEmail Poster
Top
lightman
Posted: January 15, 2017 07:10 pm
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



I think the code you will need to change is in ~/coin_includes/session_common.php starting around line 42


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
nootkan
Posted: January 23, 2017 07:22 pm
Quote Post


Advanced Member
***

Group: Members
Posts: 100
Member No.: 4,017
Joined: October 13, 2009



Lightman, thanks but I don't see anywhere in that file that allows me to change the html for my url path. Only php code in there and I don't know php well enough to figure out what line to change to what.

I assume that this is where I am supposed to make changes but again I am not sure what to change and to what. I tried adding billing/ to the
CODE
$_PACKAGE['URL'] = '';
line but nothing changed.

CODE
# Build the URL
IF ($_SERVER['SERVER_PORT'] == '80' || $_SERVER['SERVER_PORT'] == '443') {unset($_SERVER['SERVER_PORT']);}
define('BASE_HREF', (($_SERVER['HTTPS'] == 'on')?"https":"http").'://'.$_SERVER['SERVER_NAME'].((!empty($_SERVER['SERVER_PORT']))?":".$_SERVER['SERVER_PORT']:'').$_PACKAGE['PATH']);
IF ($_CCFG['USE_FULL_URL'] == 1) {
 $_PACKAGE['URL'] = (($_SERVER['HTTPS'] == 'on')?"https":"http").'://'.$_SERVER['SERVER_NAME'].((!empty($_SERVER['SERVER_PORT']))?":".$_SERVER['SERVER_PORT']:'').$_PACKAGE['PATH'];
} ELSE {
 $_PACKAGE['URL'] = '';
PMEmail Poster
Top
lightman
Posted: January 24, 2017 04:31 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,639
Member No.: 3
Joined: August 25, 2006



In that case - do it the easy way and hard code the email template replacing $_MTP[invc_url] with your full URL/path

The disadvantage is that you cannot send the client directly to a specific invoice using this method - the advantage is you don't need to know any PHP smile.gif


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 


Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com