Jump to content

jhony

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by jhony

  1. Hi guys 1 have problem with my theme, when I used background image in globel.css it's showing question mark and also minic slide show showing question mark kindly help me. http://localhost/gold/index.php
  2. Someone here who can help me in this case?
  3. Hi guys, I need help. I am using Lof Camera Slide show in my prestashop theme and slideshow showing in all pages, and I want to show it only in home page, kindly tell me how I can solve this. Below code of lofcameraslide show, kindly see and tell me where to change the code that solve my problem. <?php /* * 2011 LandOfCoder * * @author LandOfCoder * @copyright 2011 LandOfCoder * @version Release: $Revision: 1.0 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_PS_VERSION_')) exit; require_once(_PS_MODULE_DIR_ . "lofcamera/defined.php"); if (!class_exists('LOFXParams')) { require LOF_SIMPLE_SLIDE_ROOT . 'config/params.php'; } require LOF_SIMPLE_SLIDE_ROOT . 'config/lofcamera.php'; if (!class_exists('PhpThumbFactory')) { require LOF_SIMPLE_SLIDE_LIB . 'phpthumb/ThumbLib.inc.php'; } class lofcamera extends Module { /* @var boolean error */ protected $error = false; private $_postErrors = array(); public $allowedUpload = array("jpg", "bmp", "gif", "png"); public function __construct() { $this->name = 'lofcamera'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'TM'; $this->need_instance = 0; $this->params = new LofsimpleslideParams($this); parent::__construct(); $this->displayName = $this->l('Camera Slideshow'); $this->description = $this->l('Simply - Useful - smoothly, It is slideshow '); $this->confirmUninstall = $this->l('Do you want to uninstall Lof simple slideshow'); } public function install() { if (parent::install() == false OR !$this->registerHook('header') OR !$this->registerHook('top') ) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } function hookHeader() { $theme_assets = LOF_SIMPLE_SLIDE_URI_THEMES.$this->params->get('template', 'default').'/assets/'; if (_PS_VERSION_ <= "1.4") { $header .= $this->linkMedia(LOF_SIMPLE_SLIDE_URI_CSS . 'lofsimpleslide.css'); $header .= $this->linkMedia(LOF_SIMPLE_SLIDE_URI_CSS . 'slide.camera.css'); $header .= $this->linkMedia(LOF_SIMPLE_SLIDE_URI_CSS . 'slide.camera.js', 'js'); $header .= $this->linkMedia($theme_assets.'styles.css'); return $header; } else { Tools::addCSS(LOF_SIMPLE_SLIDE_URI_CSS . 'lofsimpleslide.css'); Tools::addCSS(LOF_SIMPLE_SLIDE_URI_CSS . 'slide.camera.css'); Tools::addCSS($theme_assets.'styles.css'); Tools::addJS(LOF_SIMPLE_SLIDE_URI_JS . 'slide.camera.js'); } } function hookhome($params) { return $this->processHook($params, 'home'); } function hookTop($params) { return $this->processHook($params, 'top'); } function hookleftColumn($params) { return $this->processHook($params, 'left'); } function hookrightColumn($params) { return $this->processHook($params, 'right'); } function processHook($params = array(), $hook = '') { $this->hookname = 'lofcamera_' . $hook; ob_start(); require LOF_SIMPLE_SLIDE_ROOT . 'initjs.php'; $slideSettings = ob_get_contents(); ob_clean(); //render slide configuration : //$this->renderSlideConfig(); global $smarty, $cookie; $images = $this->params->getImages(LOF_SIMPLE_SLIDE_IMAGES_PRIMARY); $params = $this->params->getValues(); //create images information : foreach ($images as $k => $img) { $basename = 'slide' . $cookie->id_lang . '_' . $k . '_'; $image = array( 'title' => $this->params->get($basename . 'title'), 'desc' => $this->params->get($basename . 'desc'), 'desc2' => $this->params->get($basename . 'desc2'), 'buttonlink' => $this->params->get($basename . 'buttonlink'), 'link' => $this->params->get($basename . 'link'), 'price' => $this->params->get($basename . 'price'), 'name' => $img, ); $images[$k] = $image; } $smarty->assign(array( 'images' => $images, 'image_uri' => LOF_SIMPLE_SLIDE_URI_IMAGES_PRIMARY, 'thumb_uri' => LOF_SIMPLE_SLIDE_URI_IMAGES_THUMB, 'params' => $params, 'hookname' => $this->hookname )); return $this->display(__FILE__, $this->getLayoutPath()) . $slideSettings; } public function getLayoutPath() { $theme = $this->params->get('template', 'default'); $layout = 'themes/' . $theme . '/default.tpl'; if (!file_exists(__FILE__ . "/" . $layout)) { return $layout; } } /** * Render processing form && process saving data. */ public function getContent() { $html = ""; if (Tools::isSubmit('submit')) { $this->_postValidation(); if (is_array($this->_postErrors) && !count($this->_postErrors)) { $this->params->hook('beforeUpdate', 'firstUpdate'); $this->params->update(); $html .= '<div class="conf confirm">' . $this->l('Settings updated') . '</div>'; } } if ($this->params->hasError()) die($this->params->getErrorMsg()); return $html . $this->params->displayForm(); } /** * Process vadiation before saving data */ private function _postValidation() { } function firstUpdate() { $this->uploadImages(); $this->updateImagesInfo(); $this->removeSelectedImages(); } function uploadImages() { $files = $_FILES[$this->params->getName('img_uploader')]; if (is_array($files['name']) && count($files['name']) && $files['name'][0] != '') { $imageWidth = $this->params->get('image_width', 600); $imageHeight = $this->params->get('image_height', 200); $thumbWidth = $this->params->get('thumb_width', 150); $thumbHeight = $this->params->get('thumb_height', 100); for ($i = 0; $i < count($files['name']); $i++) { $file = $files['name'][$i]; $file_tmp = $files['tmp_name'][$i]; if (isset($file) && $file != NULL) { $ext = strtolower(substr($file, strrpos($file, '.') + 1)); $filename = LOF_SIMPLE_SLIDE_IMAGES_ORIGIN . $file; if (in_array($ext, $this->allowedUpload)) { if (move_uploaded_file($file_tmp, $filename)) { $primayname = LOF_SIMPLE_SLIDE_IMAGES_PRIMARY . $file; //create thumbnail if not exist : if (!file_exists($primayname) && file_exists($filename)) { $this->createThumb($filename, $primayname, $imageWidth, $imageHeight); } $thumbname = LOF_SIMPLE_SLIDE_IMAGES_THUMB . $file; //create thumbnail if not exist : if (!file_exists($thumbname) && file_exists($filename)) { $this->createThumb($filename, $thumbname, $thumbWidth, $thumbHeight); } //delete origin image : if (file_exists($filename)) { @unlink($filename); } } } } } } } function updateImagesInfo() { $images = $this->params->getImages(); $languages = Language::getLanguages(true); foreach ($languages as $lang) { foreach ($images as $k => $img) { $basename = 'slide' . $lang['id_lang'] . '_' . $k; $this->params->save($basename . '_title'); $this->params->save($basename . '_desc'); $this->params->save($basename . '_desc2'); $this->params->save($basename . '_buttonlink'); $this->params->save($basename . '_price'); $this->params->save($basename . '_link'); $this->params->save($basename . '_image'); } } } function createThumb($imagePath, $thumbname, $width=100, $height=100) { $thumb = PhpThumbFactory::create($imagePath); $thumb->adaptiveResize($width, $height); $thumb->save($thumbname); return true; } function removeSelectedImages() { $images = $_POST['remove_images']; if (is_array($images) && count($images)) { foreach ($images as $imageName) { //remove origin image : $filename = LOF_SIMPLE_SLIDE_IMAGES_ORIGIN . $imageName; if (file_exists($filename)) { @unlink($filename); } //remove primay image : $imagename = LOF_SIMPLE_SLIDE_IMAGES_PRIMARY . $imageName; if (file_exists($imagename)) { @unlink($imagename); } //remove thumb image : $thumbname = LOF_SIMPLE_SLIDE_IMAGES_THUMB . $imageName; if (file_exists($thumbname)) { @unlink($thumbname); } } } } function linkMedia($src, $type='css') { if ($type == 'css') { return '<link type="text/css" rel="stylesheet" href="' . $src . '" />'; } else { return '<script type="text/javascript" src="' . $src . '"></script>'; } } }
  4. Thanks for help a lot I have got my logo on front office.
  5. Yes it is modified theme, in back office logo appear properly but on theme only default logo showing. Kindly tell me what is problem with logo. Thanks
  6. Hi guys, I have problem with my logo image. Today I upload my new theme and everything working fine but logo image not showing. Rather default logo showing. Kindly help me in this case. you can visit my website http://goldenzari.co.uk/ Kindly tell me how I can set it. Thanks
  7. Thanks for your quick replay I have got solution and my website now working fine.
  8. Yes I have got home-list image defined (under the preferenes > images) but still not working fine. what should I do now? Its taking value from home_default .
  9. At home image showing but very small size of 71*91 http://localhost/gold/img/p/1/6/16-home_default.jpg and at internal image showing like question mark http://localhost/gold/img/p/1/3/13-home-list.jpg
  10. I have also regenerate thumbnails in the preferenes > images but no success, I am still very confuse. Because all product and category images working fine in default but when I install new theme there not showing image. I am using winestore theme for this.
  11. everything fine in preferences > images now image on my site which running on localhost showing like question mark. This not on home in all page image showing like question mark. Kindly suggest me how I can set it.
  12. Hi guys I have same problem but I didn't get any solution I have checked it with above method that kaspi, radu and venture said. Kindly tell me some alternative method to solve this problem. Thanks
  13. Hi guys, I have problem with me theme. Last day I just download winestore theme and upload it and when I see my featured products image not showing as showing on default theme. So kindly help me what should I do. Sample image attached below kindly check and guide me how can I set and from which file I can set it. Thanks
  14. Nothing happened I have installed prestashop 4 to 5 time with different name. but same problem. One I installed previous version It's working fine. But latest version not working, kindly help me.
  15. Still not working kindly help me. This one error Server error The webpage at http://localhost/prestashop/index.php is currently unavailable. It may be overloaded or down for maintenance. Here are some suggestions: Reload this webpage later. HTTP Error 503 (Service Unavailable): The server is currently unable to handle the request. This code indicates this is a temporary condition, and the server will be up again after a delay.
  16. Hi guys, I am jhony new in Prestashop family I am facing little problem with my presta shop theme. First time when I installed theme it work fine, but when I second time I installed it at localhost it' showing error. Admin panel opening fine but http://localhost/prestashop/index.php page showing this one error The website encountered an error while retrieving http://localhost/prestashop/index.php. It may be down for maintenance or configured incorrectly. I have try many time but same error, please solve this. Thanks
×
×
  • Create New...

Important Information

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