Lactor Posted June 11, 2015 Share Posted June 11, 2015 Hi, I don't ask a lot of help, but I really need your help now...I can't upload a virtual product, but it' what we sell. I have a little red ribbon with "impossibleto retrieve the file" marked on it. I don't have any error log, and I have the _ps_mode_dev at true.I tried to improve the constant in the Upload class, and the max-file_size on the server was already improved.But it has no effect. I can't upload a txt file of 3Ko, so I don't think that my virtual product can (an exe of 23Mo).So, if you have a little trace, or an idea, I'll try it !Thanks in advance,Have a nice day,Lactor Link to comment Share on other sites More sharing options...
Lactor Posted June 15, 2015 Author Share Posted June 15, 2015 (edited) Hi, I discovered two little things in my AdminProductController : in the function initFormVirtualProduct, the ProductDownload class is undefined, my IDE can't find the class, but it's here, in class/ProductDownload.php. The second thing is linked, the variable $id_product_download is also undefined. I can't see why it's like that. I'll try to fix it for the 1.6.08 version. I don't know if the problem was encountered by others on the same version. Have a nice day, Lactor [EDIT] Damn, I finally found something interesting and useful. In the ProductsController, the variable $id_product_download was undefined (line 3239 somewhere like that). So, I rewrote this : $product_download = new ProductDownload(); if ($id_product_download === $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id'))) $product_download = new ProductDownload($id_product_download); $product->{'productDownload'} = $product_download; into this : $product_download = new ProductDownload(); $id_product_download = $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id')); //just added this if ($id_product_download === $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id'))) $product_download = new ProductDownload($id_product_download); $product->{'productDownload'} = $product_download; And then, I have now a cool error : the file test.txt is missing, blabla. But now, I know how to bypass this error \o/ I hope it could be useful for someone else in 1.6.0.8 ! [/EDIT] Edited June 15, 2015 by Lactor (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now