Jump to content
Latest News: (loading..)
kymation

[Contribution] Documents Manager

Recommended Posts

Hi Jim,

 

I have your contribution working in a v2.3.1 installation.

 

My site is a motorcycle spares retailer and I've uploaded around 50 odd .pdf's supplied by the manufacturer which breaks down the bikes into the component parts and complete bikes I sell.

 

The site is very new and only has around 2,500 parts uploaded and 4 complete bikes, realistically there are probably 20 times as many to upload.

 

It is possible that 1 part number may related to say 3 bike "models" and may have been used anywhere from 1 to 5 years, each year having its own parts.pdf, this would give, for example, up to 15 associations for each part number.

 

So I'm trying to figure out if there is way of displaying a parts.pdf on the documents listing without having actually created an association, so that a user could click on the documents box=>Parts.pdf, find the part he needs and then use the search functions to find the parts they require.

 

ken


Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Share this post


Link to post
Share on other sites

The Document Manager was designed to associate the document with the product. I never thought about it being used for parts.

 

Association is the only way to connect a document with a product in the current code. You would have to code up something different if you don't want to do it that way.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi Jim, thanks for info.

 

I'm trying to think of a work around solution for my issue, on the lines adding a field to TABLE_DOCUMENTS which would be, for example, CATEGORY_ID, then linking catalog/documents.php, to this new field rather than to PRODUCTS_TO_DOCUMENTS=>DOCUMENTS_ID.

 

I'm not very good at php, am I correct in thinking

 

							   " . TABLE_PRODUCTS_TO_DOCUMENTS . " p2d, 
							   " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, 
							   " . TABLE_CATEGORIES_DESCRIPTION . " cd 
						  where d.document_types_id = '" . $type . "' 
						    and dt.document_types_id = d.document_types_id 
						    and d.documents_visible = 'True' 
						    and d.documents_id = p2d.documents_id 
						    and p2d.products_id = p2c.products_id 

 

That the first and last line of the code above, being lines 43 & 50 of catalog/documents.php, are the ones select documents which have had an association created.

 

thanks

 

ken


Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Share this post


Link to post
Share on other sites

You need to add

    and cd.categories_id = p2c.categories_id

to link the categories_description table to the products_to_categories table. Then it should work.

 

Regrds

Jim

Edited by kymation

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

Share this post


Link to post
Share on other sites

Thanks JIm


Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Share this post


Link to post
Share on other sites

Hi Jim,

 

I downloaded from the "OsCommerce Community Add-Ons" side the "Document Manager 1.0.4" add-on.

Very useful programme, this likes me extremely.

I am not PHP a programmer.

My question : to make a a little of modifications , in which a counter counts , a document how many times they downloaded ?

This he could be to see on the Admin page between items of information of the document .

This would give me useful information.

 

Best Regards

 

Peter

Edited by Jossz

Share this post


Link to post
Share on other sites

That's a good idea. I'll add it to the wish list. It may be a while before I get to this though.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi Jim,

 

My question : approx. when the counter is getting ready?

I would like to use it... ;)

 

Regards

 

Peter

Share this post


Link to post
Share on other sites

think i found a small error, can anyone confim this:

 

see image attached.

 

the sort order and Document Title in this document's information does not update when update is pressed.

 

PLeae confirm or deny...

post-268503-0-75622000-1329915741_thumb.jpg

Share this post


Link to post
Share on other sites

HI!

 

'Delete' is not working.

 

I can't delete the uploaded file. It can delete the title and the sort order; it also deletes it from the web page till you click 'Update'. But in doesn't delete it from the server. Help !

 

mibo

 

 

Having the same issue running on 2.3 --- anyone solved this?

Share this post


Link to post
Share on other sites

think i found a small error, can anyone confim this:

 

see image attached.

 

the sort order and Document Title in this document's information does not update when update is pressed.

 

PLeae confirm or deny...

 

 

Resolved - FIXED - no problem

Share this post


Link to post
Share on other sites

Hi Jim,

 

I had installed your products specifications on 2.3.1, very great addon, in the extra has a document manager, it is for 2.2 version. Will it be a version of 2.3.1 coming soon?

 

I am not familiar with php code at all, struggle to convert it to 2.3.1,

now stuck at the catalog/includes/boxes/ document.php and information.php

 

tried to change the name and move to catalog/includes/modules/boxes, but then i got error said class 'bm_information' not found.

 

hopefully the 2.3.1 version available soon as this is really good one to work together with product specifications,

 

thanks

 

Lyn

Share this post


Link to post
Share on other sites

It's not hard to convert, but I don't have the time right now. Instructions for converting are here, here, and here.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

thanks Jim.

 

Will have a look, also sent email to people who had convert your addon already, see if I can get help from them.

 

I will give it a try myself though.

 

Thank you very much for the addons,

 

Lyn

Share this post


Link to post
Share on other sites

Hi Jim,

 

I had installed the document manager with Kenkja's help (modified for 2.3.1),

it got errors at the beginning and finally no errors show up.

 

I can upload the files and it did save on admin / document manager page and database, but it doesn't show in the front page.

What should I check and how can I fix it?

 

Products Specifications has a tab Manual to associate with document manager, right now the document manager is showing as an infobox in the front page, how can I make the upload files show up in the manual tab (need to fix the problem mentioned previous first)

 

And additional questions is that how can I get rid of \r\n as everytime I modify product, text or images the description tab always show uncountable \r\n....

 

Many thanks in advance.

 

Lyn

Share this post


Link to post
Share on other sites

Did you associate your manuals with the relevant products? The documents don't show up unless they have been associated. You do this in the Document Manager Admin, where you can also give them a title.

 

The only place I've seen this, I can delete the unwanted characters in CKEditor. Some people say this doesn't work. You can also put CKEditor in source mode and delete all of the line endings, so that the text is all on one line. This seems to always work.

 

I want to experiment with some code that should solve this problem, but I haven't had much time to work on it, and all of the things I've tried so far have failed, so I can't promise anything.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi Jim,

 

Thank you for your reply again.

 

The document show up properly now. Your addons are really great, thank you very much!

 

With the CKEditor, sorry I didn't understand quite much about what you said yet, so I can only hope when you get time and you can figure out the solution.

 

Before that the only way I can think about is use the extra Tab I made to replace the Description, since your Products Specification doesn't have the issues with \r nor \n. Now I have to figure out to not show the Description Tab and put the value into the new Tab I guess if my idea can work.

 

Sorry another extra question. With the product specifications and manual tabs, it show up in the middle of the product_info.php page, and on top of that is the image which my website is. As I am using jQZoom addon, i like the additional zoom image show on top of the Tabs, is that possible?

 

Thank you very much for your help!

 

 

 

Lyn

Edited by ce7

Share this post


Link to post
Share on other sites

As a quick workaround, find this code in catalog/includes/modules/products_tabs.php

 

// The Product Description content
 echo stripslashes( tep_sanitize_html( html_entity_decode( stripslashes( $product_info[ 'products_description' ] ) ) ) );

 

and change it to this

 

// The Product Description content
 echo stripslashes( stripslashes( $product_info[ 'products_description' ] ) );

 

That should be safe if you are using CKEditor for all input. It is not safe if you are using copy-and-paste from an external source.

 

Edit: To get your images to show over the tabs, try setting a z-axis value in your CSS.

 

Regards

Jim

Edited by kymation

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

Share this post


Link to post
Share on other sites

Hi Jim,

 

Thank you very much for your reply.

 

I had change the Tab name and hide the original description tab as we use copy and paste the product information from suppliers' website, but I will change the code and give it a try.

 

And thank you very much for the image over the tabs.

 

Once again, many many thanks!

 

Lyn

Share this post


Link to post
Share on other sites

Hi Jim,

 

I am trying to edit the products and all a suddent the index.php doesn't show properly.

It only show welcome message and doesn't have left nor right infoboxes and product listing.

 

I put the error on application_top.php

 

and I get the error message as below:

 

Notice: Constant DOCUMENTS_SHOW_PRODUCT_INFO already defined in /admin/includes/application_top.php on line 68

define($configuration['cfgKey'], $configuration['cfgValue']);

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /admin/includes/application_top.php:68) in /admin/includes/functions/sessions.php on line 102

 return session_start(); 

 

if I put index.php?cPath=4 then it will show up the categories product list, I have 5 subcategories so far, and the newest one I click it will go to blank index, all the other will show up the product list only when I put ?cPath=xxx

 

how can I fix it? And what make this happen?

 

Many thanks in advance.

 

Lyn

Share this post


Link to post
Share on other sites

That's a duplicate entry in the database. Use your database admin tool to search for DOCUMENTS_SHOW_PRODUCT_INFO in the configuration_key field of the configuration table. Delete any duplicate entries.

 

That error is not enough to halt the page display before it finishes. You have some other error that's causing your page problem.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

@ Kymation

 

Hi Jim,

 

A quick question, is this document manager can works for something else rather then products?

For example, can I make new document type such as resume.

 

Can I then upload file to resume type?

I had a infobox made for staff, which like to upload their resume.

Is it possible to use document manager to associate with each staff (staffid)

 

if so, what parts of files I need to find and modify?

 

Many thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×