Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#5747 by chricken
23 Feb 2018, 12:31
Hi,

for a business portal, where my products are listed, each product needs a URL to the detail-view.
I generate the data with the scheduler product export. Works fine, but unfortunately it does not export the URL.
Is it possible to get the URL with this export?

Alternatively, I thought, i could recompose the URL.
Unfortunately, I do not understand, how the URL is being composed.
Example:
https://www.insel-weine.de/shop/shop/de ... 2016_D.O./
I have no clue, where the d/62 is coming from.

Alternatively it would be helpful to trigger the search engine. But again, I don't know, how.
Is there a possibility to interpret string parameters like:
https://www.insel-weine.de/shop/shop?search=galmes

I hope, someone can help me out with this problem.
Regards
Christian
#5751 by aimeos
23 Feb 2018, 23:20
You should be able to use the "$this->url()" view helper to create URLs to detail pages:
https://aimeos.org/docs/Developers/Html_frontend/Template_syntax_and_view_helper#url

You only need to configure the page ID of the product detail page in the "Aimeos shop advanced scheduler" used for the product export.
#5798 by chricken
05 Mar 2018, 12:11
Hi,
thank you for your answer,
but I honestly have no idea, what I have to do :(

I changed the pageID in the scheduler with no effect.
Do I have to do any changes in the typoscript-configuration?

Regards
Christian
#5799 by aimeos
06 Mar 2018, 23:08
You need to add that code to https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/templates/product/export/items-body-standard.xml:

Code: Select all$detailTarget = $this->config( 'client/html/catalog/detail/url/target' );
$detailCntl = $this->config( 'client/html/catalog/detail/url/controller', 'catalog' );
$detailAction = $this->config( 'client/html/catalog/detail/url/action', 'detail' );
$detailConfig = $this->config( 'client/html/catalog/detail/url/config', [] );

$params = array( 'd_name' => $item->getName( 'url' ), 'd_prodid' => $id );
$url = $this->url( $detailTarget, $detailCntl, $detailAction, $params, [], $detailConfig );


This code is from the sitemap template: https://github.com/aimeos/ai-controller-jobs/blob/master/controller/jobs/templates/product/export/sitemap-items-body-standard.xml
#5834 by chricken
15 Mar 2018, 08:16
Sorry for the the delay, had some other issues.

Got it working finally. It wasn't as easy as it looks at first glance.
I had to add a new XML-node, looking like this:

Code: Select all<detailURL><![CDATA[<?php
$params = array( 'd_name' => $item->getName( 'url' ), 'd_prodid' => $id );
$url = $this->url( $detailTarget, $detailCntl, $detailAction, $params, [], $detailConfig );
echo $url;?>]]></detailURL>


Now I can go on, thank you :)