Magento Forum

   
Page 2 of 4
Adding new features - video and .pdf documents on the detailed product view page
 
cinemaduro
Member
 
Avatar
Total Posts:  53
Joined:  2008-06-04
North Carolina, USA
 

I’d like to add to this request, especially now that downloadable products are a reality on Magento, and say that it would be really useful to be able to use either video or music files for the main product image for sites like http://www.istockvideo.com.

With these types of sites, the roll-over video/music playing is a really nice touch, too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

I’d also like this and wonder…

Is anyone using the downloadable product type to manage their PDFs etc?

If you set the price to 0, associate them with the original product, they show on each other’s pages and you can track the number of times the file has been accessed. You also prevent competitors from lazily grabbing your files.

Customers can rate the files too.

Could this work?

 
Magento Community Magento Community
Magento Community
Magento Community
 
davenys
Member
 
Total Posts:  35
Joined:  2008-12-20
 

Any updates on this?  I am adding products to my site and desperately need to manage informational files for my technically complicated products.

 
Magento Community Magento Community
Magento Community
Magento Community
 
calin12113
Jr. Member
 
Total Posts:  7
Joined:  2008-04-29
 

Magento Team,

I think the features discussed and requested in tis post would be very useful and applicable to a lot of ecommerce store areas , therefore being a big step forward.  I refer here to the possibility of adding a .pdf document to the products from the admin and adding a new tab in after those 3 standard tags in product views.

Maybe it would be easier if magento team new releases would set the permission to add .pdf documents also in addition to photo type documents, in more views.

Any updates on this topics, especially the pdf area are welcomed.  Anybody with the same needs should post.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
l781
Sr. Member
 
Total Posts:  109
Joined:  2008-11-09
 

please look at norbolig post at:
http://www.magentocommerce.com/boards/viewreply/36690/

but i have done this feature lite this:
a) install Fontis WYSIWIG editor (v1.0.4 or higher!);
b) create Atribute width type TEXT AREA;
c) add this attribute to Atribute set;
d) from Admin - System - Admin - WYSIWYG Editor menu - go to Fontis WYSIWIG settings and enable this plugin, then - add atribute to your created attribute width TEXT area type (see picture1);
e) go to your product, find your attribute width TEXT AREA - ant add directly from Admin PDF file! (see picture 2).

And on picture No. 3 - links to PDF file!

Image Attachments
fontis.JPGfile.JPGpdf.JPG
 
Magento Community Magento Community
Magento Community
Magento Community
 
davenys
Member
 
Total Posts:  35
Joined:  2008-12-20
 

Nice solution but still this is basically adding html to the product description.

Two concerns about this solution…

1.  Fontis WYSIWYG editor with FCKEditor removes and creates havoc with Magento code.  For instance if you open and close footer links all of those links will be destroyed or made to nonsense.

2.  I think the majority of us are simply looking for another tab when adding new product that is similar to the images tab - something predetermined and uniform location for all products.

I suppose we will need to use this solution for now and I will disable FCKeditor for all places except product description.  this may work out to be OK for now.

Thank you for your input!

Any other ideas?  Keep ‘em coming.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MassDigitalMedia
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2009-02-19
Leominster, MA
 

PLEASE add me to the list of people that would be interested in contributing to pay someone to do this. I also have several videos and PDF installation guides I would like to attach to each product. Maybe if 4 or 5 of us get together, we could pay someone to do it for us?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MassDigitalMedia
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2009-02-19
Leominster, MA
 
aheadWorks - 10 March 2009 07:07 AM

Hi all,

You can use our free video module to add video on your pages easily:
http://ecommerce.aheadworks.com/free-stuff/video-module.html

Thanks.

I am using that right now. It’s very simple to install & use...seems to be working quite well for the “You Tube” stuff we have. I am trying to mod the code to create an “instruction download” section the same way. Very nice job Aheadworks!.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mauricioprado00
Member
 
Avatar
Total Posts:  62
Joined:  2009-03-11
Argentina
 

Ive a solution. it’s pretty uggly, but i did in 3 hours, so dont spect too much.
The steps illl give you will let you do the following in magento:
1) create a new dowloadable product
2) attach as much files as you want in the backend to that downloadable product
3) assign to another product a related product wich is a downloadable product wich you fullfill with attachs you want to show in the product page.

Ok, if you didnt like the solution you just stop read here, and dont came back to me with “how could you do that...” or “you should be sacrified in name of magento”. But the real scenario is that a clients want the feature and time is up and its what its.....

so do the following:

ive my own modules in magento lets call it Mymodulefiles if you have your own change that name wherever i name it.

1) go to /app/etc/modules
2) create (if doesnt already exists) a file called: Mymodulefiles_All.xml
3) add this lines if its a new file:

<?xml version="1.0"?>
<config>
    <
modules>
        <
Mymodulefiles_Catalog>
            <
active>true</active>
            <
codePool>local</codePool>
        </
Mymodulefiles_Catalog>
    </
modules>
</
config>
3.1) if you already have a module and already have the xml, just add the lines 4 to 7 of the last code
4)create this directories and files whenever necesary:
/app/code/local/Mymodulefiles/Catalog/Block/Producto/Adjuntos.php
5) fill the file “Adjuntos” wich in spanish mean “Attachs” with this code:
<?php
//this code i copy from somewhere else...  oh yea the related product class handler ( the one that list the related products...)
class Mymodulefiles_Catalog_Block_Producto_Adjuntos extends Mage_Catalog_Block_Product_Abstract
{
    
protected $_itemCollection;

    protected function 
_prepareData()
    
{
        $product 
Mage::registry('product');
        
/* @var $product Mage_Catalog_Model_Product */

        
$this->_itemCollection $product->getRelatedProductCollection()
            ->
addAttributeToSelect('required_options')
            ->
addAttributeToSort('position''asc')
            ->
addAttributeToFilter('type_id','downloadable'//HERE IS THE MAGIC, get the related downloadable products
            
->addStoreFilter()
        ;
        
Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
            
Mage::getSingleton('checkout/session')->getQuoteId()
        );
        
$this->_addProductAttributesAndPrices($this->_itemCollection);

//HERE IS THE MAGIC ALSO, show products that are not visible in the store
//        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
        //Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);

        
$this->_itemCollection->load();

        foreach (
$this->_itemCollection as $product{
            $product
->setDoNotUseCategoryId(true);
        
}

        
return $this;
    
}

    
protected function _beforeToHtml()
    
{
        $this
->_prepareData();
        return 
parent::_beforeToHtml();
    
}

    
public function getItems()
    
{
        
return $this->_itemCollection;
    
}
}

6)go to the layout file:
/app/design/frontend/defaul/default_or_whatever_your_theme_is/layout/catalog.xml
7)find the block

<catalog_product_view>
8)find the inner block
<reference name="content">
9)find the inner block of 8) (the template will vary.... i think you should know something ill omite comment everyting)
<block type="catalog/product_view" name="product.info" template="catalog/product/lt_view.phtml">
10)add this block to the block finded in 9)
<block type="mymodulefiles_catalog/producto_adjuntos" name="catalog.product.adjuntos" before="-" template="catalog/product/list/lt_adjuntos.phtml"/>
11)go to the file that render the catalog/product_view object (/app/design/frontend/defaul/default_or_whatever_your_theme_is/template/catalog/product/lt_view.phtml in my case)
12)add the following line where you want to put the links..:
echo $this->getChildHtml("catalog.product.adjuntos");
13)go to the file (create dirs/paths when necesary)
/app/design/frontend/defaul/default_or_whatever_your_theme_is/template/catalog/product/list/lt_adjuntos.phtml
14) view my nex post cause i reach the post limit

to be continue ....  (suspense music here)

 
Magento Community Magento Community
Magento Community
Magento Community
 
mauricioprado00
Member
 
Avatar
Total Posts:  62
Joined:  2009-03-11
Argentina
 

15) i think… fill the file named in 13 with this code:

<? if($this->getItems()->getSize()){
        $items 
$this->getItems();
        
$cantidad count($items);
        
$i 0;
        foreach(
$items as $_item){
            $_links 
null;
            
/** /
            var_export($_item->getData('type_id'));
            ?>
            <pre><?var_export(array_keys($_item->getData()))?></pre><?/**/
            
            
if(method_exists($_item->getTypeInstance(),'hasLinks')&&$_item->getTypeInstance()->hasLinks()){
                $_links 
$_item->getTypeInstance()->getLinks();
                
/** /
                var_export("si tiene links");/**/
                
foreach ($_links as $_link){
                    
if ($_link->getSampleFile() || $_link->getSampleUrl()){
                        $archivo 
= ($_link->getData('sample_file'));
                        
$extension explode('.'$archivo);
                        
$extension array_pop($extension);
                        
?> 
                        
<a href="<?=($this->getUrl('downloadable/download/linkSample', array('link_id' => $_link->getId())))?>">
                            <
span title="<?=$_link->getData('title')?>" class="archivo_adjunto <?=$extension?>">
                            </
span>
                        </
a><?
                        
/** /?>
                        <pre>
                        <?var_export($this->getUrl('downloadable/download/linkSample', array('link_id' => $_link->getId())))?>
                        <?var_export($_link->getData('sample_file'))?>
                        <?var_export(array_keys($_link->getData()))?>
                        <?var_export(get_class_methods(get_class($_link)))?>
                        <?var_export(array('datos_importantes'=>$_link->getData('title')))?>
                        </pre><?
                        //*/
                    
}
                }
            }
            
/** /
            else var_export("no tiene links");/**/
        

} ?>
16) remove all the commented code (or remove the commentors to take a look. its a lot of fun… )
17) add the styles for your icons. this isnt actually a css tutorial but here you have.(such a lazy people out there):
.archivo_adjunto{
    width
:16px;
    
height:16px;
    
background-imageurl(../images/lt_adjunto.png);
    
display:block;
    
float:left;
}
.archivo_adjunto.pdf{
    background
-imageurl(../images/lt_adjunto_pdf.png);
}
.archivo_adjunto.other_extension_i_pretend_to_iconize{
    background
-imageurl(../images/my_icon_image_for_that_extension.png);
}
i guess i dont have to tell you that the images must be in the directory “images” of the parent directory where the css you add the rules is located. i thought so i didnt had but just in case.
18) start making your products with attachs: here are the steps:

STEPS to Make a product with attachs:

1) create a downloadable product
2) add files in the last tab of the editor (downloadable information) wich you want to show in other product.
3)CARREFULL HERE just add the file in the SAMPLE, the other column the named “FILE” you can put anything (prefereable a very little file to dont fill your space quota)

now u ask why did i do that: first thing on my mind i suppose it wont be easy to access to the real file cause it supouse to be comercialized so it must have some security, so i didnt even want to know how to do it, and fankly this is allready a fankenstein monster so lets keep the line.

4)end up filling the required fields for the downloadable product
5) make sure the file is with the visibility “nowhere” in the General tab then save it
6) add / edit the file where you want to show the attachs that correspond to the downloadable product
7) go to the realted tab and find the downloadable product you just add in the step 5)

8) go to the front end and look how it looks like and change the template as you like

enjoy and tellme if is something missing (mauricioprado00 @gmail.com) (remove the spaces before the @)

last thing to do is to forgiveme for my awful english, or whatever its spelled.
and thanks to J.T. (the guy a couple of posts upper) that iluminate me when i was about to cry or kill some magento team member (im just kidding i like you guys)

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

Have any of you seen this extension? Useful Downloads
We are currently using it for one site and it allows for multiple files to be uploaded or downloaded from a url in the backend and shows a section of links to click on to download / view.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maxq
Sr. Member
 
Avatar
Total Posts:  126
Joined:  2008-10-27
Florida
 

one question to upload a file is it just a case of navigating to the pdf and clicking upload (like the images) or do we have to upload it to the server and then just link to it?
Is there a demo I can see?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

@maxq - it is like the images. Simply browse to the file on you computer and upload the file. Looks very similar to the images upload section except it does not give you a preview of the item.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xtimmycbs
Jr. Member
 
Total Posts:  3
Joined:  2009-02-21
 

Man i wish there was a easy way to do this....please Magento put this in future version

 
Magento Community Magento Community
Magento Community
Magento Community
 
jordy
Jr. Member
 
Total Posts:  8
Joined:  2009-01-22
 

I also desperately need a product support document feature. Hopefully the devs at Varian will notice the traffic on this thread and add to roadmap for future release. In the meantime, I have to roll my own, which is scary because module development in Magento is still a little tricky for me. I might try that FCK method suggested by l781.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 4