Jump to content

kostianev

Members
  • Posts

    19
  • Joined

  • Last visited

About kostianev

  • Birthday 05/08/1985

Contact Methods

Profile Information

  • Location
    Bulgaria, Plovdiv
  • Interests
    Web Developer
  • First Name
    Aleksandar
  • Last Name
    Kostyanev

kostianev's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Here you are: <?php /* * 2007-2015 PrestaShop * * 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 [email protected] 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 http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2015 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class PageNotFoundControllerCore extends FrontController { public $php_self = '404'; public $page_name = 'pagenotfound'; public $ssl = true; /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { Tools::redirect(); header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); if (preg_match('/\.(gif|jpe?g|png|ico)$/i', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) { $this->context->cookie->disallowWriting(); if (!isset($_SERVER['REDIRECT_URL'])) { $_SERVER['REDIRECT_URL'] = ''; if (preg_match('@^'.__PS_BASE_URI__.'([0-9]+)\-([_a-zA-Z0-9-]+)(/[_a-zA-Z0-9-]+)?\[email protected]', $_SERVER['REQUEST_URI'], $matches)) $_SERVER['REDIRECT_URL'] = __PS_BASE_URI__.'p/'.Image::getImgFolderStatic($matches[0]).'/'.$matches[0].'-'.$matches[1].'.jpg'; } if (preg_match('#/p[0-9/]*/([0-9]+)\-([_a-zA-Z]*)\.(png|jpe?g|gif)$#', $_SERVER['REDIRECT_URL'], $matches)) { // Backward compatibility since we suffixed the template image with _default if (Tools::strtolower(substr($matches[2], -8)) != '_default') { header('Location: '.$this->context->link->getImageLink('', $matches[1], $matches[2]), true, 302); exit; } else { $image_type = ImageType::getByNameNType($matches[2], 'products'); if ($image_type && count($image_type)) { $root = _PS_PROD_IMG_DIR_; $folder = Image::getImgFolderStatic($matches[1]); $file = $matches[1]; $ext = '.'.$matches[3]; if (file_exists($root.$folder.$file.$ext)) if (ImageManager::resize($root.$folder.$file.$ext, $root.$folder.$file.'-'.$matches[2].$ext, (int)$image_type['width'], (int)$image_type['height'])) { header('HTTP/1.1 200 Found'); header('Status: 200 Found'); header('Content-Type: image/jpg'); readfile($root.$folder.$file.'-'.$matches[2].$ext); exit; } } } } elseif (preg_match('#/c/([0-9]+)\-([_a-zA-Z]*)\.(png|jpe?g|gif)$#', $_SERVER['REDIRECT_URL'], $matches)) { $image_type = ImageType::getByNameNType($matches[2], 'categories'); if ($image_type && count($image_type)) { $root = _PS_CAT_IMG_DIR_; $file = $matches[1]; $ext = '.'.$matches[3]; if (file_exists($root.$file.$ext)) if (ImageManager::resize($root.$file.$ext, $root.$file.'-'.$matches[2].$ext, (int)$image_type['width'], (int)$image_type['height'])) { header('HTTP/1.1 200 Found'); header('Status: 200 Found'); header('Content-Type: image/jpg'); readfile($root.$file.'-'.$matches[2].$ext); exit; } } } header('Content-Type: image/gif'); readfile(_PS_IMG_DIR_.'404.gif'); exit; } elseif (in_array(Tools::strtolower(substr($_SERVER['REQUEST_URI'], -3)), array('.js', 'css'))) { $this->context->cookie->disallowWriting(); exit; } parent::initContent(); $this->setTemplate(_PS_THEME_DIR_.'404.tpl'); } protected function canonicalRedirection($canonical_url = '') { // 404 - no need to redirect to the canonical url } protected function sslRedirection() { // 404 - no need to redirect } }
  2. Hello, I need to make discount of all products in 1 category. Is it possible anywhere in configuration, or is there module that can do it, but module that is tested and work?
  3. Hello, when I create carrier with free shipping and activate this shipping, the other products see this shipping option too. But I want to be applied only for few products, not for other. When I try to assign the carrier with product and deactivate from admin, there is error.
  4. Hello friends, is it possible to have free shipping only fro chosen products or 1 product? Because now I have free shipping rule over 100 usd, but I want to have free shipping for chosen products.
  5. Hello, I have this question - is it possible to change the product image, when option from attribute is chosen? Also the back - when the attribute is selected to change the image? For example, we have Sunglasses model in red, blue and brown. When the user select redone, the product image to switch this color, and when he select the redone model from image to switch the red option?
  6. Hello, I need to remove the product Review TAB from product page. Here is my product page. What I already do -> Disable the Product comments from Modules, but this only remove the function - the CSS/HTML Tab is still there. I think, this is imported somewhere in the Template which I use? Can somebody help to remove this feature from the files and only to display the product additional information tab, not the review tab information.
  7. Okay, I do it and now again got White Blank Page without any error msg?
  8. Here is the error on 404 page which I get: Warning: Missing argument 1 for ToolsCore::redirect(), called in /var/www/clients/client1/web1/web/controllers/front/PageNotFoundController.php on line 113 and defined in /var/www/clients/client1/web1/web/classes/Tools.php on line 77 Notice: Undefined variable: url in /var/www/clients/client1/web1/web/classes/Tools.php on line 82 Notice: Undefined variable: url in /var/www/clients/client1/web1/web/classes/Tools.php on line 82 Notice: Undefined variable: url in /var/www/clients/client1/web1/web/classes/Tools.php on line 84 Notice: Undefined variable: url in /var/www/clients/client1/web1/web/classes/Tools.php on line 86 Notice: Undefined variable: url in /var/www/clients/client1/web1/web/classes/Tools.php on line 93
×
×
  • Create New...

Important Information

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