wrong producturls in payment emails

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
DSL
Posts: 4
Joined: 02 Apr 2019, 18:01

wrong producturls in payment emails

Post by DSL » 02 Apr 2019, 18:32

Hello,

my installation:
- Linux develop01 3.16.0-4-amd64 #1 SMP Debian 3.16.51-3
- PHP Version 7.0.33-1~dotdeb+8.1
- typo3 8.7.24
- aimeos 18.10.5

Problem:
ProductUrls in payment emails have a wrong addition between the DomainName and the index.php
example:
http://www.xxx.de/var/www/xxx/index.php?id=45&ai%5blocale%5d=de&ai%5bsite%5d=default&ai%5bcurrency%5d=EUR&ai%5bd_prodid%5d=257&ai%5bd_name%5d=000-K0249-ONTO-54&ai%5bcontroller%5d=Catalog&ai%5baction%5d=detail

The bad addition seems to be my document_root coming from $_SERVER[DOCUMENT_ROOT] or $_SERVER[SCRIPT_FILENAME]

Template which is used in both cases: basket View and payment mails by scheduler task:
aimeos\Resources\Private\Extensions\ai-client-html\client\html\templates\common\summary\detail-standard.php
In line 211:
<a class="product-name" href="<?= $enc->attr( $this->url( ( $product->getTarget() ?: $detailTarget ), $detailController, $detailAction, $params, [], $detailConfig ) ); ?>"><?= $enc->html( $product->getName(), $enc::TRUST ); ?></a>

In my basket the productUrls are ok. What can i do ?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: wrong producturls in payment emails

Post by aimeos » 03 Apr 2019, 10:04

Did you add the correct domain in a domain record at your root page?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DSL
Posts: 4
Joined: 02 Apr 2019, 18:01

Re: wrong producturls in payment emails

Post by DSL » 03 Apr 2019, 10:17

yes i did add the correct domain record

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: wrong producturls in payment emails

Post by aimeos » 03 Apr 2019, 10:23

Retrieving the domain for the e-mails is done here:
https://github.com/aimeos/aimeos-typo3/ ... e.php#L186

If the page ID of the detail page in your scheduler task is correct and you don't have the SCHEDULER_HTTP_HOST environment variable set, there's not much rooms for errors in Aimeos.

You can also try to update to the latest Aimeos release (18.10.7) if you don't find the problem in your configuration.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DSL
Posts: 4
Joined: 02 Apr 2019, 18:01

Re: wrong producturls in payment emails

Post by DSL » 03 Apr 2019, 10:27

Alright thanks a lot, i will try to debug this

tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Re: wrong producturls in payment emails

Post by tenkraD » 03 Apr 2019, 19:32

My images in payment are correct, perhaps this helps you?

- check in the scheduler task, which sends the payment order these 2 configuration
Base URL to the product images (e.g. https://localhost/uploads/tx_aimeos/)
should be something like: http://www.xxx.de/uploads/tx_aimeos/

Absolute path or path relative from TYPO3 root to the CSS files of the theme directory
i would take the absolut path there, should be something like: /home/xxx/www/xxx/typo3conf/ext/aimeos/Resources/Public/Themes/elegance

- check in the main template if u have set the ts setup for image path:
# For Frontend
plugin.tx_aimeos.settings.client.html.common.content.baseurl = /uploads/tx_aimeos/

# For backend
module.tx_aimeos.settings.client.html.common.content.baseurl = /uploads/tx_aimeos/

Greets

DSL
Posts: 4
Joined: 02 Apr 2019, 18:01

Re: wrong producturls in payment emails

Post by DSL » 04 Apr 2019, 07:07

hi and thanks for your reply,

i have tried your settings but there is still the same problem with the url in the payment mail.

The Preview image has the correct url...
<img src="https://pl.xxx.de/uploads/tx_aimeos/pro ... VSP-02.jpg" />

...And the product not
<a class="product-name" href="http://pl.xxx.de/var/www/html/xxx/index ... on]=detail">
000-K0142-OVSP-20</a>

tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Re: wrong producturls in payment emails

Post by tenkraD » 04 Apr 2019, 09:40

its a local enviroment, right? maybe you messed up some of your php settings like php include path, document root or a vhost configuration.

Post Reply