Jump to content

srkraag

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Location
    Aigle, Suisse
  • Interests
    Référencement, SEO, création de sites internet
  • Activity
    Freelancer

srkraag's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. thx for the answer lockeragencia. I've tried disabling one language but it hasn't change the problem. However I did advance on some stuff. I'm running a multishop with a common landing page when you go to www.st-selection.ch (shops url are www.st-selection.ch/catalogue/ and www.st-selection.ch/shop/) . In order to that I had to create a page called acceuil.php and insert in my .htaccess file : DirectoryIndex accueil.php Turns out it messes up with the authentification and baseuri (anycall to this var would call the landing page; a non prestashop webpage, and create the errors). Any idea how I can tweak how that works ?
  2. Hi Vekia if you can have a look around. http://www.st-selection.ch/catalogue/en/authentification Can't create an account with Mozilla or Chrome. TECHNICAL ERROR: unable to load form. Details: Error thrown: [object Object] Text status: parsererror Running Prestashop 1.6/ To be more specific, weird behavior going on. Chrome fails all the time, and I can't even log in with an existing account (going into a blank page) Firefox fails for both but if I refresh the page it worked (both creation or login). I can see this error message in my server log : [Wed Mar 11 15:06:58 2015] [error] [client 80.219.62.189] FastCGI: server "/home/clients/xxx/.config/apache/www.st-selection.ch/.fpm/php5.external" stderr: PHP message: PHP Fatal error: Call to undefined method Quotation::save() in /home/clients/xxx/web/ST-SELECTION/modules/quotation/quotation.php on line 1559, referer: http://www.st-selection.ch/catalogue/en/authentification?back=my-account
  3. You were right, Image.php was an empty file, uploaded the correct one and it works. Thx a lot !
  4. Hi there, Here's my issue : I needed to migrate my multistore from local to live, so I followed the basic modus operanti. I can acces my back office juste fine however I get a blank page when trying to reach front office. here's the file. I'm running presta 1.6 Here's the part including l109 if (substr($classname, -4) != 'Core') { // If requested class does not exist, load associated core class if (isset($this->index[$classname]) && !$this->index[$classname]['path']) { require($this->root_dir.$this->index[$classname.'Core']['path']); if ($this->index[$classname.'Core']['type'] != 'interface') eval($this->index[$classname.'Core']['type'].' '.$classname.' extends '.$classname.'Core {}'); } else { // request a non Core Class load the associated Core class if exists if (isset($this->index[$classname.'Core'])) require_once($this->root_dir.$this->index[$classname.'Core']['path']); if (isset($this->index[$classname])) require_once($this->root_dir.$this->index[$classname]['path']); } } and here's the full code from PrestashopAutoload.php <?php class PrestaShopAutoload { /** * File where classes index is stored */ const INDEX_FILE = 'cache/class_index.php'; /** * @var Autoload */ protected static $instance; /** * @var string Root directory */ protected $root_dir; /** * @var array array('classname' => 'path/to/override', 'classnamecore' => 'path/to/class/core') */ public $index = array(); public $_include_override_path = true; protected static $class_aliases = array( 'Collection' => 'PrestaShopCollection', 'Autoload' => 'PrestaShopAutoload', 'Backup' => 'PrestaShopBackup', 'Logger' => 'PrestaShopLogger' ); protected function __construct() { $this->root_dir = _PS_CORE_DIR_.'/'; $file = $this->root_dir.PrestaShopAutoload::INDEX_FILE; if (@filemtime($file) && is_readable($file)) $this->index = include($file); else $this->generateIndex(); } /** * Get instance of autoload (singleton) * * @return Autoload */ public static function getInstance() { if (!PrestaShopAutoload::$instance) PrestaShopAutoload::$instance = new PrestaShopAutoload(); return PrestaShopAutoload::$instance; } /** * Retrieve informations about a class in classes index and load it * * @param string $classname */ public function load($classname) { // Retrocompatibility if (isset(PrestaShopAutoload::$class_aliases[$classname]) && !interface_exists($classname, false) && !class_exists($classname, false)) return eval('class '.$classname.' extends '.PrestaShopAutoload::$class_aliases[$classname].' {}'); // regenerate the class index if the requested file doesn't exists if ((isset($this->index[$classname]) && $this->index[$classname]['path'] && !is_file($this->root_dir.$this->index[$classname]['path'])) || (isset($this->index[$classname.'Core']) && $this->index[$classname.'Core']['path'] && !is_file($this->root_dir.$this->index[$classname.'Core']['path']))) $this->generateIndex(); // If $classname has not core suffix (E.g. Shop, Product) if (substr($classname, -4) != 'Core') { // If requested class does not exist, load associated core class if (isset($this->index[$classname]) && !$this->index[$classname]['path']) { require($this->root_dir.$this->index[$classname.'Core']['path']); if ($this->index[$classname.'Core']['type'] != 'interface') eval($this->index[$classname.'Core']['type'].' '.$classname.' extends '.$classname.'Core {}'); } else { // request a non Core Class load the associated Core class if exists if (isset($this->index[$classname.'Core'])) require_once($this->root_dir.$this->index[$classname.'Core']['path']); if (isset($this->index[$classname])) require_once($this->root_dir.$this->index[$classname]['path']); } } // Call directly ProductCore, ShopCore class else require($this->root_dir.$this->index[$classname]['path']); } /** * Generate classes index */ public function generateIndex() { $classes = array_merge( $this->getClassesFromDir('classes/'), $this->getClassesFromDir('controllers/') ); if ($this->_include_override_path) $classes = array_merge( $classes, $this->getClassesFromDir('override/classes/'), $this->getClassesFromDir('override/controllers/') ); ksort($classes); $content = '<?php return '.var_export($classes, true).'; ?>'; // Write classes index on disc to cache it $filename = $this->root_dir.PrestaShopAutoload::INDEX_FILE; $filename_tmp = tempnam(dirname($filename), basename($filename.'.')); if ($filename_tmp !== false && file_put_contents($filename_tmp, $content) !== false) { if (!@rename($filename_tmp, $filename)) unlink($filename_tmp); else @chmod($filename, 0666); } // $filename_tmp couldn't be written. $filename should be there anyway (even if outdated), no need to die. else error_log('Cannot write temporary file '.$filename_tmp); $this->index = $classes; } /** * Retrieve recursively all classes in a directory and its subdirectories * * @param string $path Relativ path from root to the directory * @return array */ protected function getClassesFromDir($path) { $classes = array(); foreach (scandir($this->root_dir.$path) as $file) { if ($file[0] != '.') { if (is_dir($this->root_dir.$path.$file)) $classes = array_merge($classes, $this->getClassesFromDir($path.$file.'/')); else if (substr($file, -4) == '.php') { $content = file_get_contents($this->root_dir.$path.$file); $pattern = '#\W((abstract\s+)?class|interface)\s+(?P<classname>'.basename($file, '.php').'(?:Core)?)' .'(?:\s+extends\s+[a-z][a-z0-9_]*)?(?:\s+implements\s+[a-z][a-z0-9_]*(?:\s*,\s*[a-z][a-z0-9_]*)*)?\s*\{#i'; if (preg_match($pattern, $content, $m)) { $classes[$m['classname']] = array( 'path' => $path.$file, 'type' => trim($m[1]) ); if (substr($m['classname'], -4) == 'Core') $classes[substr($m['classname'], 0, -4)] = array( 'path' => '', 'type' => $classes[$m['classname']]['type'] ); } } } } return $classes; } public function getClassPath($classname) { return (isset($this->index[$classname]) && isset($this->index[$classname]['path'])) ? $this->index[$classname]['path'] : null; } } Any help is appreciated, thanx in advance !
  5. Hi, I have two shops on my prestashop installation, what I need is this : people enter the web adress www.prestaxxxx.com; Here I want them to get to a landing page with my logo and name and 2 buttons : button 1 : go to shop 1 button 2 : go to shop 2 How can I do this ? (My prestashop is installed on the root folder) . Thx in advance!
  6. Hi, I need to modify my product.tpl on a multistore installation so that it displays a different button based on the shop ID. I want : -ADD TO CART button on shop 1 -ASK FOR A QUOTE on shop 2 I've tried playing around with $(shop_name); global context variable (ID_SHOP) and other. But all my tests failed so far. Any one have an idea on how to fix this please ?
  7. Hi, I'm trying to set up a multi shop using Prestashop 1.6 but I happen to have some issues : My main store works just fine, but the second one behave like it has no templates, CSS or wathever. Prestashop is installed in a Prestashop directory, so main shop config is : Domain : www.xxx.com SSL : www.xxx.com Physical : Prestashop/ Url rewriting : Final : www.xxx.com/prestashop/ Second one is gonna be www.xxx.com/shop/ Domain : www.xxx.com SSL : www.xxx.com Physical : Prestashop/shop/ Url rewriting : Final : www.xxx.com/prestashop/shop/ When I visit my new shop (I did import templates and categories and all, during creation) I get a 404 page with no template or css... Anyone has an idea. PS: I don't see any new folder on my FTP (that should have been created according to documentation?) Thx
×
×
  • Create New...