Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
1.4 WYSIWYG and File Upload
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

Love the built in WYSIWYG - but one thing it doesnt appear to have over the Fontis one is the ability control what file types can be uloaded.

It appears to be restricted to images only right now - whereas several of our clients upload pdf documents.

Is there a section Im missing where allowed file types can be specified?

 
Magento Community Magento Community
Magento Community
Magento Community
 
CreedFeed
Member
 
Total Posts:  74
Joined:  2007-08-31
Milwaukee, WI
 

The file app/code/core/Mage/Cms/etc/config.xml defines the filetypes that can be uploaded, starting around line 110. To allow PDF’s through the “link” icon in the WYSIWYG, I modified the code so the allowed file types code looks like this:

<allowed>
    <
jpg>1</jpg>
    <
jpeg>1</jpeg>
    <
png>1</png>
    <
gif>1</gif>
    <
pdf>1</pdf>
</
allowed>
 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

Thank you so much for this - I can now upload PDFs.  However linking to them is another story.  Testing the produced link gives a skin image result - rather than the pdf file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Artega Imports
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2010-02-03
Liverpool, England, UK
 
jedimastafez - 29 March 2010 01:36 PM

Thank you so much for this - I can now upload PDFs.  However linking to them is another story.  Testing the produced link gives a skin image result - rather than the pdf file.

Please try out my method below. I have supplied this technique for all Magento Users from Beginners to Pro’s to use. I use this method for linking PDF files to the Products we Manufacture.

You can view this feature live at ualstore.co.uk and scroll down. You will see the Datasheet link under “Manufacturer”. If you need any more help, please reply to this thread.

This is the easiest, quickest and FREE method I have used.

1 - Create a folder on your server for your downloadable information. I am using Datasheets which begin with code X. Therefore for simplicity I named the folder “x”. I then uploaded ALL of my datasheets to this folder on my server. Whilst doing this, I downloaded a PDF Image and threw this in the folder too.

2 - Go to “Attributes/Manage Attributes” and add a new Attribute. Attribute Code for me was datasheet. I chose yes for available in searches as some customers will know what datasheets they are looking for, or at least the X codes will bring a selection. I also chose Visible on product view and used in product listing. Then go to Manage Label / Options. I named mine Datasheet in the Admin box. Save the new attribute.

3 - Go to Attributes. Manage Atribute Sets and open your Attribute Set. On the right you should now see this new Attribute (again, mine is datasheet. Drag the Attribute and drop it where it is required to show. I already had an Attribute called Manufacturer, so under here was perfect. Click Save Attribute Set.

4 - OK so now when you go to your existing Product in “Manage Products”, you should have the “Datasheet” option. For this part I created some coding in a basic WYSIWYG Editor.  This was the code I used :

<p>
    <
a href="http://www.MYDOMAIN/x/MYDATASHEET.pdf"><img alt="" src="http://www.MYDOMAIN/x/datasheet.gif" style="width: 25px; height: 23px;" /></a></p>

For you, just replace “MYDOMAIN” with yours of course, replace the “x” with the folder you uploaded your data and image too and of course change the name of the image to the one you uploaded to the folder. The main thing you have to do is link your data, the MYDATASHEET.pdf, just overwrite it with the name of the file you want your customers to read.

When you now view your Products it should say Datasheet (or what you chose) underneath with an image and a link into the file in your folder.

I hope this helps some people and it is worded to help novices and intermediates. If you need more help on this topic, please reply to it and I will help you solve this.

P.S this method will save you at least £55. Enjoy!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

Thanks thats a good method - but it involves you yourself having FTP access etc to create folders and upload files.

Im looking for a more “hands on” option for my clients to be able to use the WYSIWYG to load and link the pdfs themselves.

Previously this was very simple to do on the Fontis WYSIWYG - I have even created a video tutorial screencast on how to do it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
choussamaster
Sr. Member
 
Total Posts:  93
Joined:  2009-07-14
 

Hello did you found a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zenith2
Jr. Member
 
Total Posts:  8
Joined:  2010-06-30
 

CreedFeed’s advice is correct (for me using 1.4.1.0)

Adjust the XML file to allow more file extension types, then use the link button (anchor) not the insert image button.

Coming from Wordpress where you can use the insert image/media option to upload files its was counter intuitive (for me)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  59
Joined:  2008-07-15
 
jedimastafez - 29 March 2010 01:36 PM

Thank you so much for this - I can now upload PDFs.  However linking to them is another story.  Testing the produced link gives a skin image result - rather than the pdf file.

I’m having the linking problem to. It sends us to Admin.

Do you found any solution for this??

 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 
Hercilio Costa - 22 July 2010 04:24 AM

jedimastafez - 29 March 2010 01:36 PM
Thank you so much for this - I can now upload PDFs.  However linking to them is another story.  Testing the produced link gives a skin image result - rather than the pdf file.

I’m having the linking problem to. It sends us to Admin.

Do you found any solution for this??

Nope, still having the same issue.

1.4s WSYWIG is a real nightmare

 
Magento Community Magento Community
Magento Community
Magento Community
 
zenith2
Jr. Member
 
Total Posts:  8
Joined:  2010-06-30
 

did you follow CreedFeeds advice, and then try using the “insert link” button rather than the “insert image” button?

I also selected “Use Static URLs for Media Content in WYSIWYG for Catalog” = “Yes” in Admin

all working fine fine for me

 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

Hi there

Yes I did however I am unaware of this static urls setting - where exactly under (system -> configuration ?) is it found?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

I just did some researching and found it is suppossed to be an extra option under the Content Management tab?

Im on Magento ver. 1.4.0.1 and can only see the “Enable WYSIWYG editor” option under this tab?

 
Magento Community Magento Community
Magento Community
Magento Community
 
zenith2
Jr. Member
 
Total Posts:  8
Joined:  2010-06-30
 

hmm I’m using Magento ver. 1.4.1.0 - yes I have another option there for the static URLs

they really should mark some of these releases and options “experimental” shouldnt they

 
Magento Community Magento Community
Magento Community
Magento Community
 
shashi_lo
Jr. Member
 
Total Posts:  23
Joined:  2008-05-14
 

I used CreedFeed’s method and was able to upload a PDF document, but when I went to insert it, the link form would refresh and not do anything. I’ve successfully gotten this to work on Magento version 1.3, but not 1.4. Has anyone successfully done this using Magento version 1.4.1.1?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jedimastafez
Member
 
Avatar
Total Posts:  45
Joined:  2008-01-22
Bucklands Beach
 

I got it working but only on ver 1.4.1.1 and I experienced the same issue shashi_lo in firefox but found if you use Google Chrome it works fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rito
Jr. Member
 
Total Posts:  6
Joined:  2010-06-07
 

same Problem here, works fine in Safari, Opera, Chrome but not in FF & =< IE8 (each latest version)

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