Jump to content


New Members
  • Posts

  • Joined

  • Last visited

About QuentinJou

  • Birthday 02/04/1997

Contact Methods

Profile Information

  • Location
    Paris - France
  • First Name
  • Last Name
  • Activity

QuentinJou's Achievements


Newbie (1/14)

  • One Year In Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges



  1. Hello, I would like try prestashop 1.7.8 but when I try installing it I have a problem with the installation. I have this message :
  2. Thank you for your reply. Did you try this module ? I have the impression that it is not on the front office
  3. I don't know what is the error, I don(t have any error message or log (in debug mode). I think is the size because after create the cookie i redirecte the user to another page. if i keep the original size of the cookies i'm not redirect but if I reduce the size with substr 0 to 849 it work
  4. Hello, When I try to create a cookie via Context::getContext()->cookie->mycookie = $myalue; The size is limited to 849 characters. is it possible to increase it and how to do it? Thank you
  5. Bonjour a tous, Je suis en train de développer un module, et j'essaye d'exécuter une action après la mise a jour avec tout les formulaire du back-office. Je sais qu'il est possible d'executer une action apres la mise a jour pour un forms particulier avec le hook : actionAfterUpdate<FormName>FormHandler public function hookActionAfterUpdateEmployeeFormHandler(array $params) { $this->updateData($params['form_data']); } ce qui obligerais de répéter cette fonction pour chaque formulaire. Est il possible de faire une fonction pour tout les formulaire Merci
  6. Hello, I am trying to perform an action after updating all the forms. I know we can do this for each separately with the hook actionAfterUpdate<FormName>FormHandler public function hookActionAfterUpdateEmployeeFormHandler(array $params) { $this->updateData($params['form_data']); } But is it possible to have a function for all the forms ? Thank you
  7. Bonjour, J'ai le même besoin. Avez vous trouvez une solution ?
  8. Hello, I have the same need. Did you find a solution?
  9. Hello, I'm trying to develop a module to import products into the prestashop catalog. It works fine, however I have a problem importing the associated images. I found this code to copy an image from an url and associate it with the product: if (($souche->resource->subject->id) == 'Bactérie') { $url = 'https://image.flaticon.com/icons/png/512/84/84495.png'; } elseif (($souche->resource->subject->id) == 'Virus') { $url = 'https://image.flaticon.com/icons/png/512/108/108659.png'; } else { $url = 'https://image.flaticon.com/icons/png/512/108/108671.png'; } $this->initImage($product, $url); then the function: public function initImage($product, $url) { $idProduct = (int)$product->id; $image = new Image(); $image->id_product = $idProduct; $image->position = Image::getHighestPosition($idProduct) + 1; $image->cover = true; if (($image->validateFields(false, true)) === true && ($image->validateFieldsLang(false, true)) === true && $image->add() ) { $image->associateTo(Context::getContext()->shop->id); if (!self::copyImg($idProduct, $image->id, $url, 'products', true)) { $image->delete(); } } } public function copyImg( $idEntity, $idImage, $url, $entity = 'products', $regenerate = true ) { $tmpFile = tempnam(_PS_TMP_IMG_DIR_, 'ps_import'); $watermarkTypes = explode(',', Configuration::get('WATERMARK_TYPES')); switch ($entity) { case 'products': $imageObj = new Image($idImage); $path = $imageObj->getPathForCreation(); break; case 'categories': $path = _PS_CAT_IMG_DIR_ . (int) $idEntity; break; case 'manufacturers': $path = _PS_MANU_IMG_DIR_ . (int) $idEntity; break; case 'suppliers': $path = _PS_SUPP_IMG_DIR_ . (int) $idEntity; break; } $url = str_replace(' ', '%20', trim($url)); if (!ImageManager::checkImageMemoryLimit($url)) { return false; } if (Tools::copy($url, $tmpFile)) {//exception here ImageManager::resize($tmpFile, $path . '.jpg'); $imagesTypes = ImageType::getImagesTypes($entity); if ($regenerate) { foreach ($imagesTypes as $imageType) { ImageManager::resize( $tmpFile, $path.'-'.Tools::stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height'] ); if (in_array($imageType['id_image_type'], $watermarkTypes)) { Hook::exec( 'actionWatermark', array( 'id_image' => $idImage, 'id_product' => $idEntity ) ); } } } } unlink($tmpFile); return true; } but I have an exception: thank you in advance for your help
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More