agbandini Posted January 10, 2019 Share Posted January 10, 2019 Hi, Is there a way to set a product image with php without using neither the main prestashop libraries inclusion nor the api webservices? someone can explain me the steps to follow to obtain this result? is there an example script? thank you Link to comment Share on other sites More sharing options...
joseantgv Posted January 10, 2019 Share Posted January 10, 2019 (edited) 3 hours ago, agbandini said: Hi, Is there a way to set a product image with php without using neither the main prestashop libraries inclusion nor the api webservices? someone can explain me the steps to follow to obtain this result? is there an example script? thank you At first sight you just need to insert records into database and generate files in the correct folders. You need to know IDs. And remember to generate all the sizes Edited January 10, 2019 by joseantgv (see edit history) Link to comment Share on other sites More sharing options...
agbandini Posted January 10, 2019 Author Share Posted January 10, 2019 53 minutes ago, joseantgv said: At first sight you just need to insert records into database and generate files in the correct folders. You need to know IDs. And remember to generate all the sizes Hi, no problem for db and sizes....but regarding the folders, there are rules to define the target folder inside the main "img" dir? Link to comment Share on other sites More sharing options...
joseantgv Posted January 10, 2019 Share Posted January 10, 2019 6 minutes ago, agbandini said: Hi, no problem for db and sizes....but regarding the folders, there are rules to define the target folder inside the main "img" dir? Yes: Link to comment Share on other sites More sharing options...
agbandini Posted January 10, 2019 Author Share Posted January 10, 2019 wow....😅 it's a very hard folder organization expecially if you want to cerate a script by zero. in case of I would to use the ps libraries to create product and images, I'm obliged to create my script file in the ps root dir, I can not require configh.inc and init from other positions (exampl another vhost), it is true (if you know)? Link to comment Share on other sites More sharing options...
joseantgv Posted January 10, 2019 Share Posted January 10, 2019 1 hour ago, agbandini said: wow....😅 it's a very hard folder organization expecially if you want to cerate a script by zero. in case of I would to use the ps libraries to create product and images, I'm obliged to create my script file in the ps root dir, I can not require configh.inc and init from other positions (exampl another vhost), it is true (if you know)? You just need to include these files. If you are able to include them from other location... Link to comment Share on other sites More sharing options...
agbandini Posted January 10, 2019 Author Share Posted January 10, 2019 is there a way to include them from another path? 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