News:

Looking for documentation? Take a look on our wiki

Main Menu

Downloadable file in the product description

Started by Tamakom, September 19, 2012, 22:30:32 PM

Previous topic - Next topic

Tamakom

Dear virtuemart´s friends
I could not find the specific subject

I have a product, but I need to add a lot of literature. I think I have a downloadable file in the product description so that visitors can download. (pdf, doc, exe, dwf, jpg, gif, flv, VWM, ....). How I can do this in virtuemart 2.0.10?

Thanks in advance

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Tamakom

Quote from: jenkinhill on September 20, 2012, 11:56:11 AM
You can use custom fields for this:  http://forum.virtuemart.net/index.php?topic=93337.msg327528#msg327528

Or provide a link to the document file wherever you like - http://forum.virtuemart.net/index.php?topic=99225.msg327903#msg327903

Dear jenkinhill
Thank you for the link.
It seems that this path will help me.


Quote from: captainahab on September 04, 2012, 22:52:02 PM
Hi All

this might be a hack or whatever, but this is what I've done and it works....
_______________________________________________________________________________________________
<?php
$pdf_download = 'images/stories/virtuemart/product/'.$this->YagProduct->sku.'.pdf';

if (file_exists($pdf_download)) {
   ?>
   <div id="product_pdf_download">
      <a href="<?php echo $pdf_download; ?>" target="blank">Download Datasheet</a>
   </div>   
   <?php } ?>
__________________________________________________________________________________________________
So all I've done is copied all the pdf's into the product folder and made sure they've got the same name as the SKU

that mod is in the productdetails/default.php

Hope it helps someone...

James

Dear James
For the comment that jenkinhill write down, I guess the solution you give is a success. So I have to ask Where paste that code?. "I'm below the line beginning" so I have to ask possibly basic structures.

I do not understand how this is done. Should I create a new folder where? .... The code I paste into (\ components \ com_virtuemart \ views \ ProductDetails \ tmpl \ default.php) ....?
In what line?

In my inexperience, I've never seen "YagProduct", that's code itself is custom virtuemart or you?

I appreciate your understanding.

Thank in advance

jenkinhill

"Yagproduct" translates to Your Product. And you put the code into the template at wherever you want to file link to display on your page.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Tamakom

Quote from: jenkinhill on September 24, 2012, 23:50:38 PM
"Yagproduct" translates to Your Product. And you put the code into the template at wherever you want to file link to display on your page.

Thank you jenkinhill