Hello, when I'm updating order status or driver name, the confirmation email sent to client and admin does not display driver photo and company logo image.
This is because I'm updating it through SOAP API, the path to the SOAP file is:
https://aramis-paris.com/administrator/components/com_virtuemart_erp/services/methods/VOB_SOAP_Queries.php
In the email the url of the image is like this:
https://aramis-paris.com/administrator/components/com_virtuemart_erp/services/images/Site-general/Aramis_transfers_black_logo.png"
while it should be like this:
https://aramis-paris.com/images/Site-general/Aramis_transfers_black_logo.png"
I found that the base url of the site is changed when I'm updating orders status and driver with the SOAP API,
and inside Taxibooking in: components\com_taxibooking\helpers\common.php
the function changeEditorImageUrl($text) uses this SOAP base url instead of usual base url.
I found how to modify this function in the way that it strips the useless part of the url which is:
"administrator/components/com_virtuemart_erp/services/"
I can copy past it on the live site, but with every update of Taxibooking, I should copy paste this function in the site's file every time.
The question is:
May be you can integrate it in the next updated release of the Taxibooking?
Here is the modified function, I added only one line:
function changeEditorImageUrl($text)
{
$base = JURI::root();
$base = preg_replace("/\/administrator\/components\/com_virtuemart_erp\/services\//", "", $base);
$text = preg_replace("/(src)=\"(?!http|ftp|https)([^\"]*)\"/", "$1=\"$base\$2\"", $text);
return $text;
}
Serge.
This is because I'm updating it through SOAP API, the path to the SOAP file is:
https://aramis-paris.com/administrator/components/com_virtuemart_erp/services/methods/VOB_SOAP_Queries.php
In the email the url of the image is like this:
https://aramis-paris.com/administrator/components/com_virtuemart_erp/services/images/Site-general/Aramis_transfers_black_logo.png"
while it should be like this:
https://aramis-paris.com/images/Site-general/Aramis_transfers_black_logo.png"
I found that the base url of the site is changed when I'm updating orders status and driver with the SOAP API,
and inside Taxibooking in: components\com_taxibooking\helpers\common.php
the function changeEditorImageUrl($text) uses this SOAP base url instead of usual base url.
I found how to modify this function in the way that it strips the useless part of the url which is:
"administrator/components/com_virtuemart_erp/services/"
I can copy past it on the live site, but with every update of Taxibooking, I should copy paste this function in the site's file every time.
The question is:
May be you can integrate it in the next updated release of the Taxibooking?
Here is the modified function, I added only one line:
function changeEditorImageUrl($text)
{
$base = JURI::root();
$base = preg_replace("/\/administrator\/components\/com_virtuemart_erp\/services\//", "", $base);
$text = preg_replace("/(src)=\"(?!http|ftp|https)([^\"]*)\"/", "$1=\"$base\$2\"", $text);
return $text;
}
Serge.