URL to a product
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!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
URL to a product
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 ... g_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
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 ... g_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
Re: URL to a product
You should be able to use the "$this->url()" view helper to create URLs to detail pages:
https://aimeos.org/docs/Developers/Html ... 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.
https://aimeos.org/docs/Developers/Html ... 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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: URL to a product
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
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
Re: URL to a product
You need to add that code to https://github.com/aimeos/ai-controller ... andard.xml:
This code is from the sitemap template: https://github.com/aimeos/ai-controller ... andard.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 );
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: URL to a product
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:
Now I can go on, thank you
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