-
Posts
29 -
Joined
-
Last visited
Contact Methods
- Website
-
Skype
francesco.nappo2
Profile Information
-
Location
napoli
-
Activity
Freelancer
cicciotargatona's Achievements
-
yeah 400 errors are become 106 Errors, 11 warning(s) again again
-
what i have to change? I disactive apache multiviews?
-
How i turning friendly ursl on?
-
Hello people of prestashop! I try to have for one time in my life before die a markup validation on http://validator.w3.org/ someone crazy can help me? http://validator.w3.org/check?uri=luxelumi.com&charset=%28detect+automatically%29&doctype=Inline&group=0 (for see all errors CSS in my website) In particular ther is an common mistake : /luxelumi.com/index.php?id_category=96&controller=category&id_lang=1" title="I… & did not start a character reference. (& probably should have been escaped as &.) So i have just to change the ''&'' with ''&" But what .php i have to change for that is apply at all pages and resolve any problems? Thank you! My prestashop: 1.5.6.2
-
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
/www/modules/addhomefeatured -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
SOLVED $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "position",null,false,true,true,($nb ? $nb : 8)); -
visualizzare blocco newsletter in pagina CMS
cicciotargatona replied to robertocommerce's topic in Sviluppatori PrestaShop
Che Dio ti benedica! -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
News? -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
vekia now function with the spaces between lines, but show only one prodcut, not 16 -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
ah function now! but show only one product -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
<?php if (!defined('_PS_VERSION_')) exit; class AddHomeFeatured extends Module { private $_html = ''; private $_postErrors = array(); function __construct() { $this->name = 'addhomefeatured'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'Custom'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Add Featured Products on the homepage'); $this->description = $this->l('Displays Featured Products in the middle of your homepage.'); } function install() { if (!Configuration::updateValue('HOME_FEATURED_NBR', 8) || !parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('displayHeader')) return false; return true; } public function getContent() { $output = '<h2>'.$this->displayName.'</h2>'; if (Tools::isSubmit('submitAddHomeFeatured')) { $nbr = (int)(Tools::getValue('nbr')); if (!$nbr OR $nbr <= 0 OR !Validate::isInt($nbr)) $errors[] = $this->l('Invalid number of products'); else Configuration::updateValue('HOME_FEATURED_NBR', (int)($nbr)); if (isset($errors) AND sizeof($errors)) $output .= $this->displayError(implode('<br />', $errors)); else $output .= $this->displayConfirmation($this->l('Settings updated')); } return $output.$this->displayForm(); } public function displayForm() { $output = ' <div class="clearfix"></div> <form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post"> <fieldset><legend>'.$this->l('Settings').'</legend> <p>'.$this->l('In order to add products to your homepage, just add them to the "home" category.').'</p><br /> <label>'.$this->l('Number of products displayed').'</label> <div class="margin-form"> <input type="text" size="5" name="nbr" value="'.Tools::safeOutput(Tools::getValue('nbr', (int)(Configuration::get('HOME_FEATURED_NBR')))).'" /> <p class="clear">'.$this->l('The number of products displayed on homepage (default: 10).').'</p> </div> <center><input type="submit" name="submitAddHomeFeatured" value="'.$this->l('Save').'" class="button" /></center> </fieldset> </form>'; return $output; } function hookHeader($params) { $this->context->controller->addCSS($this->_path.'css/addhomefeatured.css'); } public function hookDisplayHome($params) { $category = new Category(Context::getContext()->shop->getCategory(), Configuration::get('PS_LANG_DEFAULT')); $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); $products = $category->getProducts((int)Context::getContext()->language->id, 1, ($nb ? $nb : 8), "position",null,false,true,true); $p=array(); for($i=0;$i<count($products);$i++){ $product=$products[$i]; unset ($pid); $pid=$product['id_product']; $sql= "SELECT * FROM `"._DB_PREFIX_."image` WHERE `id_product` = '{$pid}' AND cover = '0' ORDER BY `id_image` "; $results = Db::getInstance()->ExecuteS($sql); @$result=$results['0']; $p[$pid]=$result['id_image']; } $this->smarty->assign('addimages',$p); $this->smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize('home'), )); return $this->display(__FILE__, 'addhomefeatured.tpl'); } } -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
Parse error: syntax error, unexpected 'exit' (T_EXIT) in /homez.808/luxelumi/www/modules/addhomefeatured/addhomefeatured.php on line 1 -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
No show me an error page blank -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
Fuckkk you're right! hahaha, and how i can edit? <?php if (!defined('_PS_VERSION_')) exit; class AddHomeFeatured extends Module { private $_html = ''; private $_postErrors = array(); function __construct() { $this->name = 'addhomefeatured'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'Custom'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Add Featured Products on the homepage'); $this->description = $this->l('Displays Featured Products in the middle of your homepage.'); } function install() { if (!Configuration::updateValue('HOME_FEATURED_NBR', 8) || !parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('displayHeader')) return false; return true; } public function getContent() { $output = '<h2>'.$this->displayName.'</h2>'; if (Tools::isSubmit('submitAddHomeFeatured')) { $nbr = (int)(Tools::getValue('nbr')); if (!$nbr OR $nbr <= 0 OR !Validate::isInt($nbr)) $errors[] = $this->l('Invalid number of products'); else Configuration::updateValue('HOME_FEATURED_NBR', (int)($nbr)); if (isset($errors) AND sizeof($errors)) $output .= $this->displayError(implode('<br />', $errors)); else $output .= $this->displayConfirmation($this->l('Settings updated')); } return $output.$this->displayForm(); } public function displayForm() { $output = ' <div class="clearfix"></div> <form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post"> <fieldset><legend>'.$this->l('Settings').'</legend> <p>'.$this->l('In order to add products to your homepage, just add them to the "home" category.').'</p><br /> <label>'.$this->l('Number of products displayed').'</label> <div class="margin-form"> <input type="text" size="5" name="nbr" value="'.Tools::safeOutput(Tools::getValue('nbr', (int)(Configuration::get('HOME_FEATURED_NBR')))).'" /> <p class="clear">'.$this->l('The number of products displayed on homepage (default: 10).').'</p> </div> <center><input type="submit" name="submitAddHomeFeatured" value="'.$this->l('Save').'" class="button" /></center> </fieldset> </form>'; return $output; } function hookHeader($params) { $this->context->controller->addCSS($this->_path.'css/addhomefeatured.css'); } public function hookDisplayHome($params) { $category = new Category(Context::getContext()->shop->getCategory(), Configuration::get('PS_LANG_DEFAULT')); $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); $products = $category->getProducts($params['cookie']->id_lang, 1, ($nb ? $nb : 10)); $p=array(); for($i=0;$i<count($products);$i++){ $product=$products[$i]; unset ($pid); $pid=$product['id_product']; $sql= "SELECT * FROM `"._DB_PREFIX_."image` WHERE `id_product` = '{$pid}' AND cover = '0' ORDER BY `id_image` "; $results = Db::getInstance()->ExecuteS($sql); @$result=$results['0']; $p[$pid]=$result['id_image']; } $this->smarty->assign('addimages',$p); $this->smarty->assign(array( 'products' => $products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'homeSize' => Image::getSize('home'), )); return $this->display(__FILE__, 'addhomefeatured.tpl'); } } -
Random product display on featured page
cicciotargatona replied to rakepl's topic in Configuring and using PrestaShop
Hahahahaha yes Vekia /modules/homefeatured/homefeatured.php come in my shop, maybe you found something of anomalous http://luxelumi.com