Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Edit product custom-options validation server-side ? 
 
guillaume_SHM
Jr. Member
 
Total Posts:  28
Joined:  2012-03-14
 

Hello,

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.

Can you help me with that ?

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.

Thank you !

PS: Running Mage CE 1.6.2

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume_SHM
Jr. Member
 
Total Posts:  28
Joined:  2012-03-14
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top