pramod0586 / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

List attachments in admin menu #454

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Create Admin menu for managing attachments.
The menu should have 2 pages:
1. List all attachments in table. Reusing built in Magento grid and pagination.

2. Add config page, initially for setting auto deleteion of old files, and 
number of days after which file is old. 

Original issue reported on code.google.com by jamb...@gmail.com on 8 Feb 2011 at 12:41

GoogleCodeExporter commented 8 years ago
What's gonna be in the attachments table?

1. File name
2. Date/time uploaded
3. Order #
4. User ?
5. delete checkbox
6. ?

Original comment by zetapri...@gmail.com on 8 Feb 2011 at 10:35

GoogleCodeExporter commented 8 years ago
In table for now in order of placement are:
1. Checkbox
2. Attachment ID
3. Product id
4. Order ID if any else N/A
5. File name
6. Delete link

Date information is not saved at this time. User is not saved too, you don't 
have to be registered to upload files, and this page only handles listing and 
deleting of files no order management of any kind. 

Original comment by jamb...@gmail.com on 9 Feb 2011 at 9:29

GoogleCodeExporter commented 8 years ago
What is attachement id?
Is it unique or just a number of the line on the page?

What is product ID?
How about showing SKU or product name?
Will it be linked to the product?

Will order id be linked to the order?

Will file name be linked to the file itself?

Original comment by zetapri...@gmail.com on 10 Feb 2011 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 10 Feb 2011 at 4:35

GoogleCodeExporter commented 8 years ago
1. Attachment id is what it says - the id of the file as stored in DB.
2. Product id - the same. It can be linked to the product if desired, product 
name or sku can be shown, but this is additional weight to the app.
3. Order could be linked from the row. Again, this is additional processing. 
For one line that is ok, but for more it can slow thing down.
4. Yes file is linked to downloading it.

Original comment by jamb...@gmail.com on 11 Feb 2011 at 11:32

GoogleCodeExporter commented 8 years ago
Basic interface is ready for review and testing.
I have applied latest changes to magedev.
The changes include a settings section in system > configuration > catalog
For a shortcut the admin can slick on Attachments > Attachments Settings
The section has one group of settings with 4 fields.

Also added is Attachments list table, where all files are listed.  And can be 
deleted individually or in mass action.

Original comment by jamb...@gmail.com on 14 Feb 2011 at 5:29

GoogleCodeExporter commented 8 years ago
I would simplify Attachments Options screen.

How about we remove the dropdowns and only use keep period fields?
Blank value or 0 = do not delete files.

Delete orphaned files
"Max number of days to keep files uploaded and not attached to any orders. 
Leave blank or zero for manual deletion only."

Delete old files
"Max number of days to keep any uploaded files. Leave blank or zero for manual 
deletion only."

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 6:07

GoogleCodeExporter commented 8 years ago
Is it possible to link to the order directly by the order ID?

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 6:13

GoogleCodeExporter commented 8 years ago
@ 7 Look now, is this what you mean?
@ 8 Probably yes. Should I link them?

Original comment by jamb...@gmail.com on 14 Feb 2011 at 6:20

GoogleCodeExporter commented 8 years ago
Yes, let's link order ID to order details page.
Convenience, I guess.

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 6:37

GoogleCodeExporter commented 8 years ago
Do we actually need the top menu entry for this?

Would it be easier to stash "Attached files" under order and the settings page 
under System/Config where it is now?

I'm thinking this ext. is not the most important one to put it up the top.

Not sure about it, thou.
Just a thought.

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 6:41

GoogleCodeExporter commented 8 years ago
Try order link now - I think there are 2 last products that have linked order.
Do you think we should link product as well?

Original comment by jamb...@gmail.com on 14 Feb 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Link products - yes, it doesn't cost any more in generating the page.
One thing I find annoying in magento is lack of direct links.
I have to get the id and then go find that thing somewhere else.

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 7:23

GoogleCodeExporter commented 8 years ago
Linked - showing product name instead of ID

Original comment by jamb...@gmail.com on 14 Feb 2011 at 7:30

GoogleCodeExporter commented 8 years ago
I think we are done.

Would you care to change the status of an issue you are working on next time, 
please? :)

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 7:37

GoogleCodeExporter commented 8 years ago
Sure

Original comment by jamb...@gmail.com on 14 Feb 2011 at 7:41

GoogleCodeExporter commented 8 years ago
Evening quiz: why was this issue not accepted for testing?

Original comment by zetapri...@gmail.com on 14 Feb 2011 at 7:47

GoogleCodeExporter commented 8 years ago
Have no idea why.
I will just post revisions involved here and then spend the night solving the 
quiz.
http://code.google.com/p/magento-w2p/source/detail?r=1359
http://code.google.com/p/magento-w2p/source/detail?r=1360
http://code.google.com/p/magento-w2p/source/detail?r=1361
http://code.google.com/p/magento-w2p/source/detail?r=1362
http://code.google.com/p/magento-w2p/source/detail?r=1363
http://code.google.com/p/magento-w2p/source/detail?r=1365

All commits are related to settings page and list table.

Original comment by jamb...@gmail.com on 14 Feb 2011 at 8:30

GoogleCodeExporter commented 8 years ago
This still needs to be tested.
Test on mageimage that is more complete 1.5 compatible version of the extension.

Original comment by jamb...@gmail.com on 22 Feb 2011 at 7:32

GoogleCodeExporter commented 8 years ago
Well, it all seems to be working fine and according to what was decided in the 
previous comments.

Found one err - the File name link should lead to the file it self but does 
not. It is not linked properly and ends up on the Magento admin Dashboard - 
main home page.

Original comment by agur...@gmail.com on 23 Feb 2011 at 4:27

GoogleCodeExporter commented 8 years ago
Would you please give file ID that does that?

Original comment by jamb...@gmail.com on 23 Feb 2011 at 6:29

GoogleCodeExporter commented 8 years ago
Any of them.. every one I tried does that.
Try it on ID 48 for ex, the PDF file.

Original comment by agur...@gmail.com on 23 Feb 2011 at 6:57

GoogleCodeExporter commented 8 years ago
With 1.0.4b version this should not be a problem no more.
r1421 has the changes about this issue.

Original comment by jamb...@gmail.com on 7 Mar 2011 at 1:08

GoogleCodeExporter commented 8 years ago
This works fine and is Test OK.

I see 14 diffs on this r1421 page, however. Are all of these concerning the fix 
for bug reported in comment #20? 
If not, please specify a diff. When someone wants to find the fix later on, 
should they comb through the entire release? 
This is only if the fix is not part of each and every change logged in r1421, 
ofcourse. If all listed diffs are related, issue can be closed.

Original comment by agur...@gmail.com on 7 Mar 2011 at 2:09

GoogleCodeExporter commented 8 years ago
Well they mostly are. The issue is complex because it encompasses not only 
listing files, but deleting them too. I will list here all files that are 
directly connected to the problem.
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/sql/attachments_setup/mysql4-upgrade-1.0.3-1.0.4.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/controllers/Adminhtml/AttachmentsController.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Model/Mysql4/Attachments/Collection.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Model/Attachments.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Block/Adminhtml/Attachments/Grid/Column/Renderer/Option.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Block/Adminhtml/Attachments/Grid/Column/Renderer/Attachment.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Block/Adminhtml/Attachments/Grid.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&old=1399&r=1421&fo
rmat=side&path=%2Fbranches%2FZetaPrints_Attachments%2FZetaPrints_Attachments%2FZ
etaPrints%2FAttachments%2FBlock%2FAdminhtml%2FAttachments.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1421&r=1421&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/controllers/IndexController.php

Original comment by jamb...@gmail.com on 7 Mar 2011 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 7 Mar 2011 at 9:25