Jump to content



Photo

[Contribution] Documents Manager


  • Please log in to reply
187 replies to this topic

#1   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 07 September 2009 - 00:21

This is the support thread for the Documents Manager contribution.

Document Manager allows you to manage free downloadable documents related to your products. These documents are attractive to both customers and search engines. Documents can be listed on separate pages and on the associated product page. The main features can be controlled from the Admin.

Screenshots are provided in the package.

Regards
Jim

Edited by kymation, 07 September 2009 - 00:24.

See my profile for a list of my addons and ways to get support.


#2   rjckicks1

rjckicks1
  • Members
  • 72 posts
  • Real Name:squirLy

Posted 08 September 2009 - 16:16

Hello,

I installed your contribution because it fits exactly what I need done on my site. I'm just running into one problem. I am able to add/remove document types, and documents through the admin, but when I go to the document page for that document type it says there are no documents currently available for this document type. Do you know why this would be happening? You can see the document page here - http://dandyblend.bi...ents.php?type=1

There is currently a product under Brochure and it is activated under admin( green ).

I'd really appreciate your help.

Thanks

#3   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 08 September 2009 - 16:27

Hello,

I installed your contribution because it fits exactly what I need done on my site. I'm just running into one problem. I am able to add/remove document types, and documents through the admin, but when I go to the document page for that document type it says there are no documents currently available for this document type. Do you know why this would be happening? You can see the document page here - http://dandyblend.bi...ents.php?type=1

There is currently a product under Brochure and it is activated under admin( green ).

I'd really appreciate your help.

Thanks

If you have Show Categories in List set to True (the default) only documents that are associated with a product will show up. See 4.2 in the readme.txt for a solution.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#4   tormentin

tormentin
  • Members
  • 6 posts
  • Real Name:Andrea

Posted 08 September 2009 - 21:20

I've install this contribution and when I try to import the sql database, I've this error:

Error
consulta SQL:

## ## Table structure for table `products_to_documents` ## CREATE TABLE IF NOT EXISTS `products_to_documents` ( `products_to_documents_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `documents_id` int(11) NOT NULL default '0', `last_updated` datetime NOT NULL, UNIQUE KEY `id` (`products_to_documents_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ## ## Add data for table `configuration_group` ###################################################################### ## *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* ## ## ## ## If ID #1027 has been used by another addon, change the 1027 to ## ## another number that has not been used, in the next line AND ## ## all lines in the `configuration` table section. ## ## ## ## *WARNING* *WARN[...]

MySQL ha dicho:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `configuration_group` (`configuration_group_id`, `co

I use PhPMyadmin - Server version: 5.0.45

Can you help me?

Thanks

#5   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 08 September 2009 - 23:39

See the warning in Lines 70-80 of documents_manager.sql.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#6   rjckicks1

rjckicks1
  • Members
  • 72 posts
  • Real Name:squirLy

Posted 09 September 2009 - 00:01

If you have Show Categories in List set to True (the default) only documents that are associated with a product will show up. See 4.2 in the readme.txt for a solution.

Regards
Jim


Hi Jim,

I must of looked that over, thanks for your help! It's working perfectly now.

#7   bejo

bejo
  • Members
  • 8 posts
  • Real Name:Bjoern
  • Gender:Male

Posted 12 September 2009 - 16:40

Hallo Jim,

Here again. Thank you for your time, work and effort programing for people like me.

I have installed your tool Document Manger. I am not much of a programmer so it took me several hours.

After installing I could upload the needed documents but clicking on the link in product_info not the document is showing up but this



Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, service@webmailer.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



PLEEEAASE do you have any advice for me what went wrong.

Thank you very much in advance for your support.

Regards from Indonesia

BeJo

#8   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 12 September 2009 - 16:48

That's a general error, so it could be quite a few different things.

1. Take a look at the link to the document. Is it correct?

2. Check the document using FTP or your host's file manager. Is the size correct? If you download it using FTP, can you open the file?

Regards
Jim

See my profile for a list of my addons and ways to get support.


#9   bejo

bejo
  • Members
  • 8 posts
  • Real Name:Bjoern
  • Gender:Male

Posted 13 September 2009 - 09:22

That's a general error, so it could be quite a few different things.

1. Take a look at the link to the document. Is it correct?

2. Check the document using FTP or your host's file manager. Is the size correct? If you download it using FTP, can you open the file?

Regards
Jim


Thank you for your reply. I have checked everything possible File size FTP download etc all correct or working until installing completely new I still get that <<< INTERNAL ERROR >>> Message.

One difference from your screen shots I noticed. When opening from the Documents Box the Title is shown but not the file name. My conclusion when don't now the "address" I wouldn't know where to go either. That might be the mistake. But I seriously don't know where to look for it.

I am still hoping to get to work but as I said my skills are very limited in this field. When you getting an idea while having a nice cup of tea in the morning please let me know. Your advice is appreciated very much.

Regards from Indonesia
BeJo

#10   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 13 September 2009 - 16:59

This code uses the stock osCommerce upload system that's normally used to upload images in the Admin. I'm at a loss to explain why it would work for images and not for these files. Try this: Upload one or more files using FTP and use the Update feature to add them to the database. That uses a different method of finding the files, so it may work where the stock code does not.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#11   public

public
  • Members
  • 1 posts
  • Real Name:Peter

Posted 14 September 2009 - 16:19

Hallo Jim,

Here again. Thank you for your time, work and effort programing for people like me.

I have installed your tool Document Manger. I am not much of a programmer so it took me several hours.

After installing I could upload the needed documents but clicking on the link in product_info not the document is showing up but this



Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, service@webmailer.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



PLEEEAASE do you have any advice for me what went wrong.

Thank you very much in advance for your support.

Regards from Indonesia

BeJo


delete .htaccess in documets

#12   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 14 September 2009 - 16:27

delete .htaccess in documets

That's an invitation to get hacked. Don't do it.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#13   bejo

bejo
  • Members
  • 8 posts
  • Real Name:Bjoern
  • Gender:Male

Posted 15 September 2009 - 02:57

That's an invitation to get hacked. Don't do it.

Regards
Jim



Dear Peter,
Dear Jim,

Thank you both very much for supporting me and giving an idea and advice to find a solution. Since I am quite experimental I of course did deleted the. htacces. The result was not much more successful. Only the message text changed to this

-----------------------------------------

Not Found

The requested URL /xxxxxx.biz/documents/manualscoversheet_indonesia.pdf was not found on this server.

------------------------------------------

Maybe another hint for you where to look, since I have nor clue. I did do some things myself with a catastrophic result.

The file is there, I also uploaded with the upload function of the tool and using a FTP client. The result is the same.

Now my feeling is getting stronger that the actual problem is, as I mentioned before, that the address can't be found. I am might be a little pain in the a.. with this. But this tool is what I need and is doing it in a very professional way.

So I will try everything to get it running. Thank you very much for all your help and patients guys.

Regards form Indonesia,
BeJo

Edited by bejo, 15 September 2009 - 03:10.


#14   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 15 September 2009 - 03:46

The answer is right there in the URL you posted. documents/manualscoversheet_indonesia.pdf should be documents/manuals/coversheet_indonesia.pdf. Of course it can't be found, since it's looking for the wrong file in the wrong place.

You need to look at the code that's generating that link. If it's in catalog/product_info.php, the code is actually in catalog/includes/modules/documents.php. Whoops, that's a bug in the code. Line 71 is:
echo '<span class="document"><a href="' . tep_href_link (DIR_WS_DOCUMENTS . $products_documents['type_name'] . $products_documents['documents_name']) . '" target="_new">';
Change that to:
echo '<span class="document"><a href="' . tep_href_link (DIR_WS_DOCUMENTS . $products_documents['type_name'] . '/' . $products_documents['documents_name']) . '" target="_new">';
Thanks for the bug report; I'll update the distribution with this fix.

Don't forget to put that .htaccess back.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#15   bejo

bejo
  • Members
  • 8 posts
  • Real Name:Bjoern
  • Gender:Male

Posted 15 September 2009 - 10:44

The answer is right there in the URL you posted. documents/manualscoversheet_indonesia.pdf should be documents/manuals/coversheet_indonesia.pdf. Of course it can't be found, since it's looking for the wrong file in the wrong place.

You need to look at the code that's generating that link. If it's in catalog/product_info.php, the code is actually in catalog/includes/modules/documents.php. Whoops, that's a bug in the code. Line 71 is:

echo '<span class="document"><a href="' . tep_href_link (DIR_WS_DOCUMENTS . $products_documents['type_name'] . $products_documents['documents_name']) . '" target="_new">';
Change that to:
echo '<span class="document"><a href="' . tep_href_link (DIR_WS_DOCUMENTS . $products_documents['type_name'] . '/' . $products_documents['documents_name']) . '" target="_new">';
Thanks for the bug report; I'll update the distribution with this fix.

Don't forget to put that .htaccess back.

Regards
Jim


Dear Jim,

Thank you so much for the time you have been spending with this tool and your help. It is working now but only without the .htaccess.

When I have the .htaccess in the documents folder I do get the Internal Error message again. I just gonna be faithful that nobody will do harm to my website. Even though Indonesia is, unfortunately, big in hacking.

Once again - Thank you all very much.

With very kind regards from Indonesia
BeJo

#16   bejo

bejo
  • Members
  • 8 posts
  • Real Name:Bjoern
  • Gender:Male

Posted 15 September 2009 - 11:06

Dear Jim,

One more, but don't hate me now. When I am clicking the Link in the "Documents Info Box" the document title is being shown but not the name of the file. Like this

----------------------------------------------------

TITLE ----------------------------PDF DOCUMENT

Category
coversheet ------------------------- .pdf

-----------------------------------------------------

When clicking the document link the following information is showing up

----------------------------------------------------

Not Found

The requested URL /xxx.biz/documents/forms/.pdf was not found on this server.

----------------------------------------------------

Regards again
BeJo

Edited by bejo, 15 September 2009 - 11:11.


#17   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 15 September 2009 - 15:43

The system is not finding the filename correctly. Check the documents table in your database; it's probably not right there. Does the file exist, and does it have the right name? Try clicking the Update button in the Admin and see if it shows up with the right name.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#18   mousewebdesign

mousewebdesign
  • Members
  • 149 posts
  • Real Name:Mouse Webdesign
  • Gender:Male
  • Location:Netherlands

Posted 20 September 2009 - 06:53

Hi there,

Thanx for this great contribution. It's just what I needed !

But I have a question. I've uploaded three pdf-files so far and tried several ways to display them. Everything is working, but they're not displayed on documents.php in the catalog root. The file is displaying the message that no documents can be found.

I don't have 'Show Categories in List' set to true, but even when I associate the documents to a specific product, it still doesn't show up. Therefor I think I might have a problem with just the file document.php

When associating the documents to a product it's working fine on product_info.php. I can see the download and it works even well.

Can anyone tell my why it's not showing up on documents.php?

Kind regards,

Marcus

#19   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,643 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 20 September 2009 - 16:19

When you are looking at documents.php, did you open that page by clicking on one of the links from the Information or Documents box? Which one? Do the appropriate links show up in whichever of those boxes you are using?

Regards
Jim

See my profile for a list of my addons and ways to get support.


#20   mousewebdesign

mousewebdesign
  • Members
  • 149 posts
  • Real Name:Mouse Webdesign
  • Gender:Male
  • Location:Netherlands

Posted 20 September 2009 - 18:35

When you are looking at documents.php, did you open that page by clicking on one of the links from the Information or Documents box? Which one? Do the appropriate links show up in whichever of those boxes you are using?

Regards
Jim


Hi Jim.

I think that was one problem solved: after clicking on the left box the page opened with documents.php?type=7 and now I saw the documents.

BUT

it seems that the documents aren't shown correctly. I have three pdf-files within one category but only one is showing up with a title, but with 3 pdf-file links. Except that the links are to .pdf instead of document1.pdf.

Who to solve this second issue?

Marcus