Jump to content

Linking a PDF to an Image


kriemhilde

Recommended Posts

Hi, I'm currently learning how to setup Prestashop and use it as an assignment for the company I'm interning at.

One of the things they've asked me to do is something like what this website uses:

 

http://xtools.pt/

 

When you scrolldown you can see an accordion of images and when you click on one it downloads a pre-made PDF with a full catalog of products based on the category you select.

 

What I want to know is how can I do that in Prestashop, or if it's even possible?

I've seen modules that create a PDF based on a product, but these PDFs are pre-made.

 

I just want to link, like a hyperlink I guess? A PDF to an image.

 

Any help or advice is appreciated! =)

Edited by kriemhilde (see edit history)
Link to comment
Share on other sites

You haven't mentionned your prestashop version.

However, a simple approcach would be to use a free basic module like 'home text editor'.

There you can insert free text with images and links. The module has nothing to do with PDF but allows to set a link to basically any pre-existing file.

Link to comment
Share on other sites

  • 2 weeks later...

I'm currently with kriemhilde on this project and we still didn't get what we're looking for. 

 

I've been searching for a template which has this feature, but we're still stuck on this subject. Does anyone knows any template that has something like this?

 

Thanks

 


Link to comment
Share on other sites

Why searching for a template only for this small change?

Change the tpl file of your existing one. It seems to be a small change only.

Just as an example - even if the shop isn't productive anymore look here:

 

https://mit100wir.ch/wirshop/

 

On the left column under the 4rd title named 'ALLE AKTIONEN you see a PDF icon and if you click it, you get a full product catalog.

The code for this looks like that:

<div id="pdf_block_left" class="block">
    <p class="title_block">Alle Aktionen 10.08.2017</p>
    <div class="block_content_narrow">
        <p><br /><a title="WIR-Aktionen als PDF-Download" href="/katalog/WIR-Aktionen.pdf" rel="nofollow"> <img class="f_left" src="/wirshop/img/wir-aktion-pdf.png" alt="WIR-Aktionen 100% WIR - täglich aktuell" width="40" height="40" /></a> <a title="WIR-Aktionen - täglich aktuell (PDF)" href="/katalog/WIR-Aktionen.pdf" rel="nofollow" target="_blank">WIR-Aktionen - PDF-Katalog</a></p>
    </div> 
</div>
Link to comment
Share on other sites

I understand that. But the change would probably not require any php programming at all if the PDF file is pre-existing and has a static path. It is simple HTML code you put into a theme file (tpl) whereever it fits your needs. However if HTML is also a show stopper, it might get more difficult.

Edited by Scully (see edit history)
Link to comment
Share on other sites

Ok, understood. Just one more question.

 

I'm presenting those catalogs as products in a specific category. How do I change that .tpl file without changing other products?

 

Maybe I shouldn't present them as products, Idk.

Link to comment
Share on other sites

It wouldn't open undemanded files. The category would be named Catalogs being its description something like "Download here our product catalogs" and when the list of products shows up, the visitor already knows that clicking on one of them it would download the pdf.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...