Author Topic: Adding additional files eg product instructions/specs NOT downloads.  (Read 18514 times)

Tamakom

  • Beginner
  • *
  • Posts: 41
Re: Adding additional files eg product instructions/specs NOT downloads.
« Reply #15 on: September 24, 2012, 04:41:58 am »
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.

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

I appreciate your understanding.

Thank in advance

Swanky-Pixels

  • Jr. Member
  • **
  • Posts: 162
    • Swanky Pixels
Re: Adding additional files eg product instructions/specs NOT downloads.
« Reply #16 on: October 12, 2012, 00:52:36 am »
This subject is causing me no end of problems!

Using Joomla 2.5.7 and VM 2.0.12b Problem example here http://www.urbanenergyuk.com/air-source-heat-pump-distributor/air-source-heat-pump-cylinders/gledhill/gledhill-heat-pump-cylinder-210l-detail

I have 200+ products and each has a PDF spec sheet

I was adding product, then add main image then I uploaded the PDF same method in product all worked fine and the PDF would download. But I did not like the CSS

Thats when I found this forum post.

I added custom field called PDF then added custom field to test product, selected existing PDF all works great and CSS is better.

But I then tried uploading a PDF via media files but is states The server supports mime type recognition Supported filetypes for thumbnail creation GIF, JPG, PNG, WBMP

What have a done wrong? Is my only option to upload via FTP?
"I am always doing what i can not do in order to learn how to do it"


https://www.swankypixels.com
http://www.cotswold-designs.co.uk

PolishedGeek

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 263
  • Joomla! Innovation Refined.
    • Polished Geek, LLC - Joomla! extensions, web development & custom integrations
Re: Adding additional files eg product instructions/specs NOT downloads.
« Reply #17 on: October 15, 2012, 22:33:31 pm »
Oh Captain, my captain (like you haven't heard that before, right? LOL)....Could you share a link or screenshot of the final result of your mod?
~ Deb Cinkus, CEO
Polished Geek, LLC   |    www.PolishedGeek.com

Creators of JoomLister - eBay Lister for Joomla!

SnowBunny

  • Beginner
  • *
  • Posts: 3
Re: Adding additional files eg product instructions/specs NOT downloads.
« Reply #18 on: November 16, 2012, 05:34:31 am »
See I don't understand why VM2 does not have the option to have a downloadable spec sheet on the product pages. You can upload pdf media to the product but there is no way to display it or automatically link it to the product.

So frustrating to have to edit code for something that should be a standard feature..

David Kan

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 395
  • CMSmart - e-commerce solution
    • Virtuemart Extension Developers
  • VirtueMart Version: Joomla! 2.5.x - 3.x, Virtuemart 2.x - 3