Question

I’m implementing a PERL upload on the product page of Magento, with a progressbar, in AJAX with instant upload on the product page. This upload replaces the standard “file” custom option.

My upload is fine, but I’m facing a problem with the required attribute of the option.

The upload is done directly on the product page, and when it starts, the value of the input file seems to be empty. I’ve managed to disable the client-side validation when the file is uploaded, but I can’t find where to edit the server-side verification of the custom-options form in the product page.

I’m storing upload data in the session and my aim is to check if the current required custom option is already linked to a file uploaded via PERL upload. If yes, get rid of the validation of this file option.

Was it helpful?

Solution

No I was not searching for the "not required" option.

My aim was to make a required option but, with some defined condition, allow some custom option to be empty at cart validation.

I made it by rewriting Mage_Catalog_Model_Product_Option_Type_File and function _validateUploadedFile in my case.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top