Jump to content
thirty bees forum

312erik123

Members
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by 312erik123

  1. Hello, Noticed something that might be considered a bug when having customizable products in a multistore environment - where the stores share products. With a customizable product, product.tpl will see that the product is customizable and try to add fields. However the the function getCustomizationFields() in Product.php checks in the table "customization_field_lang" where customizable entries exists only exists the original store. So the $field variable served to product.tpl is bool with the value false. Resulting in no fields...
  2. Yeah I guess. I’m experiencing some weird issues with module, so I had to disable it. For example when using Safari, if I press the add to cart button on a product page, I’m redirected to the cart, but the cart is empty…have you had similar issues?
  3. The exact same as me. I’ve sent them an email and they replied that a dev would look at it. Which I guess is far from a promise. I also get this error occasionally: Error: Call to a member function getParam() on string modules/litespeedcache/controllers/front/esi.php line 94 which I also sent to them. But I see that you’ve already made a bug report on their GitHub about it!
  4. @the.rampage.rado Many thanks for your tips. My site was under a SPAM-attack for a couple of days. With that taken care of the newly generated file is not growing in size the same way. Also found a few bugs in my code with the "Collect PHP Logs" module. Now it's mostly the litespeed module that generates "Deprecated" messages...maybe I'll send them an email and see if they want to update the module.
  5. Hello, Just noticed that the error_log file in my production site has become huge (14 GB). What can cause it to balloon that much? Is it safe to delete it? Thanks Erik
  6. Well, more of a hack actually so maybe not a good idea to push into the codebase, but this is the code: Override with this method: protected function processImage($sourceFile, $sourceFileName) { $imageSize = getimagesize($sourceFile); if (! $imageSize) { throw new PrestaShopException($this->l("Failed to resolve image size")); } $mimeType = strtolower(substr(strrchr($imageSize['mime'], '/'), 1)); if (! in_array($mimeType, static::ALLOWED_EXTENSIONS)) { throw new PrestaShopException(sprintf($this->l("Unsupported mime type %s"), $mimeType)); } // resize file to target destination $filename = md5(microtime()) . '_' . preg_replace('/[^a-zA-Z0-9._-]/', '', $sourceFileName); $filenameSmall = preg_replace('/(\.jpg)$/', 'small$1', $filename); $filenameWebp = preg_replace('/\.jpg$/', '.webp', $filename); $filenameWebpSmall = preg_replace('/\.jpg$/', '.webp', $filenameSmall); $filepath = static::getImageDir() . $filename; $filepathSmall = static::getImageDir() . $filenameSmall; $filepathWebp = static::getImageDir() . $filenameWebp; $filepathWebpSmall = static::getImageDir() . $filenameWebpSmall; if ($imageSize[0] > 1000) { $changeFactor = 0.5; } else { $changeFactor = 0.8; } if (! ImageManager::resize($sourceFile, $filepath, null, null, $mimeType)) { throw new PrestaShopException($this->l('An error occurred during the image resizing')); } if (! ImageManager::resize($sourceFile, $filepathSmall, $imageSize[0]*$changeFactor, $imageSize[1]*$changeFactor, $mimeType)) { throw new PrestaShopException($this->l('An error occurred during the image resizing')); } if (! ImageManager::resize($sourceFile, $filepathWebp, null, null, 'webp')) { throw new PrestaShopException($this->l('An error occurred during the image resizing')); } if (! ImageManager::resize($sourceFile, $filepathWebpSmall, $imageSize[0]*$changeFactor, $imageSize[1]*$changeFactor, 'webp')) { throw new PrestaShopException($this->l('An error occurred during the image resizing')); } return $filename; } And include this in the homeslider.tpl: <picture> {$imageUrl=$link->getMediaLink($slideImageUrl)|escape:'htmlall':'UTF-8'} {$imageUrlsmall=preg_replace('/(\.jpg)$/', 'small$1', $imageUrl)} {$filenameWebp = preg_replace('/\.jpg$/', '.webp', $imageUrl)} {$filenameWebpSmall = preg_replace('/\.jpg$/', '.webp', $imageUrlsmall)} <source media="(max-width: 600px)" srcset="{$filenameWebpSmall}" type="image/webp"> <source media="(min-width: 601px)" srcset="{$filenameWebp}" type="image/webp"> <source media="(max-width: 600px)" srcset="{$imageUrlsmall}" type="image/jpeg"> <source media="(min-width: 601px)" srcset="{$imageUrl}" type="image/jpeg"> <img class="img-responsive" src="{$link->getMediaLink($slideImageUrl)|escape:'htmlall':'UTF-8'}" alt="{$slide.legend|escape:'htmlall':'UTF-8'}" {if isset($slide.size) && $slide.size} {$slide.size}{/if} </picture> Maybe someone can do a proper implementation with this as a base? (and of course don't forget to remove ImageMagic 🙂 )
  7. Exactly, thats what i do with the Homeslider. I have overridden the "processImage" function to generate wepb and jpg images in 2 sizes and included a responsive scrset in the homeslider.tpl file. I guess you could do that for basically any module.
  8. Hello, Problem solved, or kind of solved... The overrides from ImageMagic remained eventhough i had disabled the module. With them removed I now get webp-images, most of them are quite a bit bigger than the jpgs...maybe a quality setting... And for anyone else looking to trouble shoot php code using Logger::addlog(""); works well!
  9. No modules don’t do that, thats what’s what I’ve been trying to do with the home slider module. @datakick & @the.rampage.rado do you know how to debug ImageManager.php or similar classes? Been trying “echo” and “echo <script> console.log…” but I get nothing…
  10. Hey! Thanks for you quick responses. @the.rampage.rado I'm not using ImageMagic. @datakick Tried to update to latest bleeding edge, same issue. When i generate thumbnails, they are generated as both jpg and webp, where the webp is significantly smaller. However when i try to do the same thing for the homeslider, the images are the exact same size. This is how I call ImageManager:Resize method ImageManager::resize($sourceFile, $filepathWebp, null, null, 'webp') - where the sourceFile is a jpg file, the filepath is specified with a wepb extension...any ideas?
  11. Hello, Trying to reduce the footprint of some parts of my website by using webp images. So I've been trying ImageManager:resize to convert to webp, however, the size of the image is always exactly the same as the input jpg-file. Anyone know why that is the case? How can I use ImageManger to convert wepb and reduce the size of my images? Thanks Erik
  12. @datakick Hi, thanks for answering. In prestashop 1.6 i could use this structure: The first combination would get an image assigned to position 2 from the url - and all following combinations with position 2 and no url would get the same image. As thirty bees works today - how do I know which position is assigned to each image so that I can refer to that image? And where do I specify the image url? Thanks Erik
  13. Hello, Think I found a bug in the CSV-import of Combinations. If an image in a combination is assigned an "Image Position", thirty bees seems to ignore it... a consequence of this is that if you have a combination that you want to have the same image as a combination that already has an image, it is not found. Anyone with the same problem?
  14. Seems as it was the UTF-8 enconding - thanks for pointing me in the right direction!
  15. The strange this is that it only changes some of the characters: Checked it on a prestashop site where the import works without any problems...
  16. Hello, This issue has kind of re-appeared, now most of, not all, scandinavian letters are changed to chinese(?) characters... On bleeding edge...Anyone else? @the.rampage.rado Do you know anything? Br. Erik
  17. Ah, but maybe then the ability to select several or select all - like in the product listings in BO?
  18. I use the original default-bootstrap from prestashop, I've modified it so much so can't really change. But don't have the CLS problems on prestashop...
  19. So far just a testing environment - all in all very good. Experiencing some CLS (Cumulative Layout Shift) issues that I didn't get with prestashop so trying to understand why. Went straight to bleeding edge!
  20. Hey, Just migrated a store from prestashop to TB. After the migration TB recommended hundreds of database fixes - took like 45 min to apply them all. Would be great with a "Apply all" - button. More nice to have than need to have, but still 😀 Br Erik
  21. Have the same issue - did you manage to solve it?
  22. Works! Perfect, many thanks! checked my backup site, it also hade 7.4 in the platform_check file before any changes/updates. So I guess settings.conf.php wasnt being updated, but the rest of the system was
  23. Done. But can I verify that I now have the 7.4 version? "Advanced Parameters>Configuration Information" reads from settings.conf.php as I understand it?
×
×
  • Create New...