How do i show download attributes(pdf) in frontend?
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!
How do i show download attributes(pdf) in frontend?
In the simple view of the aimeos shop, there is a "Downloads" tab. If my customer uploads there a pdf file, how do i show it as a downloadable document in the frontend?
Code: Select all
<?php if( ( $mediaItems = $this->detailProductItem->getRefItems( 'media', null, 'download' ) ) !== [] ) : ?>
<div class="additional-box">
<h2 class="header downloads"><?= $enc->html( $this->translate( 'client', 'Downloads' ), $enc::TRUST ); ?></h2>
<ul class="content downloads">
<?php foreach( $mediaItems as $id => $item ) : ?>
<?php if( isset( $mediaList[$id] ) ) { $item = $mediaList[$id]; } ?>
<li class="item">
<a href="<?= $this->content( $item->getUrl() ); ?>" title="<?= $enc->attr( $item->getName() ); ?>">
<img class="media-image"
src="<?= $this->content( $item->getPreview() ); ?>"
alt="<?= $enc->attr( $item->getName() ); ?>"
/>
<span class="media-name"><?= $enc->html( $item->getName() ); ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
typo3 8.7.7
php 7.0.16
Linux 2.6
Re: How do i show download attributes(pdf) in frontend?
Well, you can upload other files in the "images" tab of the product panel and those will show up in the frontend. Maybe we should better rename that to "media"?
The download tab is only for files you have to buy.
The download tab is only for files you have to buy.
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: How do i show download attributes(pdf) in frontend?
When uploading a pdf file, it appeared next to the image, icould not change the media type from the simple view of the backend. I have attached some additional screenshots to better explain the problem:
In the expert view, I was able to upload an image with a donwload type, and it showed up in the frontend like this:
But in the simple backend view, my customer is unable to achieve this, and I couldn't find a way either (from backend only, would be possible from PHP, but if it's possible in expert view, it should also be possible in the simple view )
In the expert view, I was able to upload an image with a donwload type, and it showed up in the frontend like this:
But in the simple backend view, my customer is unable to achieve this, and I couldn't find a way either (from backend only, would be possible from PHP, but if it's possible in expert view, it should also be possible in the simple view )
Re: How do i show download attributes(pdf) in frontend?
That's possible since 2018.01 in the JQAdm interface as well.
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