Jump to content

Virtual products selling problem


prestaseller

Recommended Posts

By default, PrestaShop set max file upload size to 100M, it is in your configuration file /config/config,inc.php/

 
if (Tools::convertBytes(ini_get('upload_max_filesize')) < Tools::convertBytes('100M')) {
    ini_set('upload_max_filesize', '100M');
}
If you see 8M limitaiton, I guess it is modified by someone or limited by your hosting server.
You can try to add php.ini file under your store root folder with following lines to override the hosting setting configuration.

 

post_max_size = 100M
upload_max_filesize = 100M
If this does not work, it mean hosting server does not allow you override, you may have to contact your service provider support for help.
 
 

 

  • Like 1
Link to comment
Share on other sites

the virtual product file is saved in following folder

 

StoreRoot/download/

 

but the file name is encoded, you need to find out the file name for each product from following table ps_product_download

I see a light. :D Wich file name i had to copy (i added a pictures just to try, so i see the file name with .jpg in the end, and a long code near), and where i need to paste it inside prestashop?

Link to comment
Share on other sites

Sorry i don't understand....maybe my question was wrong, i try again:

 

I upload the file via ftp

 

Next i go on front office and click on add new product

 

i select virtual product and write the product name

 

next i go on virtual product to insert the uploaded file

 

there i see add files and file name, so here where i need to paste the file name from ps_product_download ?

Link to comment
Share on other sites

just upload any old jpg image when you add the new virtual product.  your new jpg file will be created in the download folder.  copy the name of the newly created file, and then delete it.

 

Now upload your real jpg file, and rename it to the name you just copied.

Link to comment
Share on other sites

Hi, maybe i do something wrong, but the method does not work :(

 

I tried with a video:

 

uploaded a 9mb video from prestashop product page (not ftp)

 

Then on database i copy the display_filename (examplename.mp4) and filename (something like iulhfwpru0n3vuf3p04ufè0è02923234)

 

i deleted it from database

 

then via ftp i upload a 50 mb video

 

edit the display_filename of 50 mb video on database

 

i go back to prestahop refresh the page, nothing, the filename disappears and ask me to upload a new product.

Edited by prestaseller (see edit history)
Link to comment
Share on other sites

It work fine, thanks again. But now i have a new big problem...I was tryng to customize the store menu and categories. So i was frustrated by the fact that i can associate a product only in home category. So i deleted every categories and this is the result:

 

[PrestaShopException]

Root category must be an integer value
at line 212 in file classes/helper/HelperTreeCategories.php

207. }
208.
209. public function setRootCategory($value)
210. {
211. if (!Validate::isInt($value)) {
212. throw new PrestaShopException('Root category must be an integer value');
213. }
214.
215. $this->_root_category = $value;
216. return $this;
217. }

 

This message appear when i click on product section. How i can fix this? ç__ç

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...