Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.


Generous Backer
  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About Mark


  • About Me
    Mark T

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Mark

    Broken images

    Thanks @datakick I have now updated to Bleeding Edge 1.1.0 , great spotting. Things seem to ok at first glance at the moment, and images that werent working before under Stable1.1.0 are now there Now I'll do what @Traumflugsuggests and look closely at any remaining problem images and replace them and look for anything else. Thank you all. Brilliant Core Updater process by the way, love that its so easy to change versions.
  2. Mark

    Broken images

    Note for anyone looking at my site and seeing I have images: I have temporarily reverted to Stable version of 1.1.0 which does present most but not all of the images while we complete this last piece of the puzzle, in order that customers, in the main, can do their thing....
  3. Mark

    Broken images

    I told why I cancelled your back office access @zen and you seemed fine with that at the time. It was cancelled because Traumflug was working on the code to fix it for everyone and there would be no need for you or I to try and change the back office or codebase when the proper solution was close at hand. Within hours of that, Traumflug did correct the code and it was the right decision to not spend time trying to change the codebase or back office settings adhoc in a potentially hazardous fashion. Despite having done a bleeding edge update yesterday @datakickmy ImageType.php file doesnt resemble yours. This is what I have <?php /** * 2007-2016 PrestaShop * * thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA * Copyright (C) 2017-2018 thirty bees * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@thirtybees.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.thirtybees.com for more information. * * @author thirty bees <contact@thirtybees.com> * @author PrestaShop SA <contact@prestashop.com> * @copyright 2017-2018 thirty bees * @copyright 2007-2016 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * PrestaShop is an internationally registered trademark & property of PrestaShop SA */ /** * Class ImageTypeCore * * @since 1.0.0 */ class ImageTypeCore extends ObjectModel { // @codingStandardsIgnoreStart /** * @var array Image types cache */ protected static $images_types_cache = []; /** @var array $images_types_name_cache */ protected static $images_types_name_cache = []; /** @var string Name */ public $name; /** @var int Width */ public $width; /** @var int Height */ public $height; /** @var bool Apply to products */ public $products; /** @var int Apply to categories */ public $categories; /** @var int Apply to manufacturers */ public $manufacturers; /** @var int Apply to suppliers */ public $suppliers; /** @var int Apply to scenes */ public $scenes; /** @var int Apply to store */ public $stores; // @codingStandardsIgnoreEnd /** * @see ObjectModel::$definition */ public static $definition = [ 'table' => 'image_type', 'primary' => 'id_image_type', 'fields' => [ 'name' => ['type' => self::TYPE_STRING, 'validate' => 'isImageTypeName', 'required' => true, 'size' => 64], 'width' => ['type' => self::TYPE_INT, 'validate' => 'isImageSize', 'required' => true], 'height' => ['type' => self::TYPE_INT, 'validate' => 'isImageSize', 'required' => true], 'categories' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'products' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'manufacturers' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'suppliers' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'scenes' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], 'stores' => ['type' => self::TYPE_BOOL, 'validate' => 'isBool'], ], ]; protected $webserviceParameters = []; /** * Returns image type definitions * * @param string|null $type Image type * @param bool $orderBySize * * @return array Image type definitions * @throws PrestaShopDatabaseException * * @since 1.0.0 * @version 1.0.0 Initial version * @throws PrestaShopException */ public static function getImagesTypes($type = null, $orderBySize = false) { // @codingStandardsIgnoreStart if (!isset(static::$images_types_cache[$type])) { $query = (new DbQuery()) ->select('*') ->from('image_type'); if (!empty($type)) { $query->where('`'.bqSQL($type).'` = 1'); } if ($orderBySize) { $query->orderBy('`width` DESC, `height` DESC, `name` ASC'); } else { $query->orderBy('`name` ASC'); } static::$images_types_cache[$type] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); } return static::$images_types_cache[$type]; // @codingStandardsIgnoreEnd } /** * Check if type already is already registered in database * * @param string $typeName Name * * @return int Number of results found * * @throws PrestaShopDatabaseException * @throws PrestaShopException * @since 1.0.0 * @version 1.0.0 Initial version */ public static function typeAlreadyExists($typeName) { if (!Validate::isImageTypeName($typeName)) { die(Tools::displayError()); } Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( (new DbQuery()) ->select('`id_image_type`') ->from('image_type') ->where('`name` = \''.pSQL($typeName).'\'') ); return Db::getInstance()->NumRows(); } /** * @param string $name * * @return string * * @throws PrestaShopDatabaseException * @throws PrestaShopException * @since 1.0.0 * @version 1.0.0 Initial version */ public static function getFormatedName($name) { $themeName = Context::getContext()->shop->theme_name; $nameWithoutThemeName = str_replace(['_'.$themeName, $themeName.'_'], '', $name); //check if the theme name is already in $name if yes only return $name if (strstr($name, $themeName) && static::getByNameNType($name)) { return $name; } elseif (static::getByNameNType($nameWithoutThemeName.'_'.$themeName)) { return $nameWithoutThemeName.'_'.$themeName; } elseif (static::getByNameNType($themeName.'_'.$nameWithoutThemeName)) { return $themeName.'_'.$nameWithoutThemeName; } else { return $nameWithoutThemeName.'_default'; } } /** * Finds image type definition by name and type * * @param string $name * @param string $type * * @param int $order * * @return bool|mixed * @throws PrestaShopDatabaseException * @throws PrestaShopException * @since 1.0.0 * @version 1.0.0 Initial version */ public static function getByNameNType($name, $type = null, $order = 0) { static $isPassed = false; // @codingStandardsIgnoreStart if (!isset(static::$images_types_name_cache[$name.'_'.$type.'_'.$order]) && !$isPassed) { $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('SELECT * FROM `'._DB_PREFIX_.'image_type`'); $types = ['products', 'categories', 'manufacturers', 'suppliers', 'scenes', 'stores']; $total = count($types); foreach ($results as $result) { foreach ($result as $value) { for ($i = 0; $i < $total; ++$i) { static::$images_types_name_cache[$result['name'].'_'.$types[$i].'_'.$value] = $result; } } } $isPassed = true; } $return = false; if (isset(static::$images_types_name_cache[$name.'_'.$type.'_'.$order])) { $return = static::$images_types_name_cache[$name.'_'.$type.'_'.$order]; } // @codingStandardsIgnoreEnd return $return; } }
  4. Mark

    Broken images

    Excuse me, I'm not sure what caused that response from you zen. My website is in production live and has no images and customers cannot see the products they are trying to buy and making complaints. I do not know how to fix that and haven't made any suggestions that I have ant better way. I reached out for help on the settings and still have a broken site
  5. I did this, however it resulted in my the loss of all images on my website, Oh well, there was always that risk
  6. Mark

    Broken images

    OK so right now I have no images, I have no idea how to change the settings so I have images. The settings I have are at the start of this thread and I believe that they are set by the theme and I dont want want to particularly play with those.
  7. Mark

    Broken images

    Ok so I need to know what the settings should be (/solutions is the account in which everything sits)
  8. Mark

    Broken images

    Ive just undertaken a bleeding edge update which I believe incorporate's @Traumflug's changes. Unfortunately now I seem to have no images at product.solutions.org.nz When updating the thumbnails I get Original image is corrupt (/home/solution/public_html/product/img/p/1/9/4/194.jpg) or bad permission on folder
  9. OK, so I have been watching this issue here for which I need an update into my production site. I really do not want to add @Traumflug's code fixes from GitHub directly and in isolation as doing so could affect something else that I haven't yet updated that is also sitting under development. So in order to immediately bring in his changes I would need to do a bleeding edge update into production, which you do not recommend (Understandably). I cant really wait until it goes into Stable mode so what do you suggest?
  10. yesterday I signed up as supporter, with no history on patreon, it seems to have gone fine and i come up on here correctly as a supporter
  11. Mark

    Broken images

    OK, I had to manually delete the community theme and manually reinstall. What should the image settings be for "home" (Note they also dont sometimes appear in the back office and in places other than "home" either)
  12. Mark

    Broken images

    An example is here https://product.solutions.org.nz/remote-car-alarm-with-central-locking-and-engine-disable You'll notice in the back office all of these images are presented as placeholder images (image attached) Im using community theme
  13. Mark

    Broken images

    Hi around the time I updated to 1.1.0 many images became unusable by the system and now just have camera image placeholders throughout the site. Uploading new replacement images doesn't help. Ive tried regenerating thumbnails and the .htaccess file The process is that Im uploading product images, they upload fine, but then show as camera image placeholders in the back office. Sometimes they appear fine on the front office, sometimes not. Thinking its possibly something to do with Image Generation, Ive attached two pictures here of my image management section
  14. My problem was primarily something to do with changing themes. Something in doing that caused something to go pear shaped. Then I had a few other issues as I mentioned above (including the 500 errors), but right now, things are working. When I'm feeling brave enough, I will try again with the Niara theme. Note: I've just updated the Core which will probably deal with the 500 errors see as Traumflug has fixed those
  15. I went to the thirtybees store, created an account, logged in, tried to download it (seems like the old version) . Download didnt' work, just went to homepage Then I went to git hub, uploaded the zip file..... 500 error Now I will try to FTP..... FTP failed... 500 error by using the Theme import Tried FTP using direct... that worked, files uploaded. Unfortunately now the theme controller wont install new theme because it has same name as old theme... I guess I have to manually delete old files.... Deleted old theme files... Now in the theme page... Bad or missing config.xml in theme in /home/solution/public_html/product/themes/community-theme-default. No surprise there as I deleted it.... Now the whole front end has a 500 error.... Suggestions???? @SLiCK_303 @datakick Restored trashed old community theme files, 500 error gone Renamed old theme community-theme-old, saved this change to newly created "backup" directory (within themes) Was now free to install, then enable the new community theme This works! Except that all the configurations I made to the old theme yesterday are unsurprisingly gone More time to reconfigure....
  • Create New...