1

Noticed after Patch Supee-8788 is applied, the delete button for the Downloadable Products does not work after the file has been uploaded, there is no way to delete files after they have been uploaded.

delete button for downloadable product file

I am sure this is a bug in Magento, I think the developer who changed the Downloadable products upload from flash to js, forgot to test the delete button.

1

I found the solution, this is a bug in SUPEE-8788

Open samples.phtml inside app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable

Find the function

remove : function(event){
    var element = $(Event.findElement(event, 'tr'));
    alertAlreadyDisplayed = false;
    if(element){
        element.down('input[type="hidden"].__delete__').value = '1';
        element.down('div.flex').remove();
        element.addClassName('no-display');
        element.addClassName('ignore-validate');
        element.hide();
    }
},

and replace it with

remove : function(event){
    var element = $(Event.findElement(event, 'tr'));
    alertAlreadyDisplayed = false;
    if(element){
        element.down('input[type="hidden"].__delete__').value = '1';
        Element.select(element, 'div.flex').each(function(elm){
            elm.remove();
        });
        element.addClassName('no-display');
        element.addClassName('ignore-validate');
        element.hide();
    }
},

I hope you will solve the problem

1
  • thank you for the answer it does indeed work. I've accepted your answer (albeit a little late) just going through my account and revisiting things. Again thank you.
    – djfordz
    Mar 28 '18 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.