neastea18
Members-
Posts
50 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
neastea18's Achievements
Newbie (1/14)
1
Reputation
-
Bonjour à tous, je suis intéressé par cette modification, mais avec la possibilité d'affichage de pictogrammes J'ai trouvé ce sujet http://www.prestashop.com/forums/topic/83009-tutorial-devforever-ajouter-pictogrammes-valeurs-carateristiques/ mais, malheureusement, la variable n'est pas passée au template ... Un peu d'aide serait la bienvenue ... Cordialement,
- 106 replies
-
- caracteristique
- plusieurs valeurs
- (and 4 more)
-
Bonjour à tous, J'ai adapté un code pour afficher les groupes dans Admin Customers: (J'ai nommé la colonne Company car, j'utilise les groupes pour séparer des sociétés. public function __construct() { $this->table = 'customer'; $this->className = 'Customer'; $this->lang = false; $this->edit = true; $this->view = true; $this->delete = true; $this->deleted = true; $this->requiredDatabase = true; $this->_select = '(YEAR(CURRENT_DATE)-YEAR(`birthday`)) - (RIGHT(CURRENT_DATE, 5)<RIGHT(`birthday`, 5)) as age, ( SELECT c.date_add FROM '._DB_PREFIX_.'guest g LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest WHERE g.id_customer = a.id_customer ORDER BY c.date_add DESC LIMIT 1 ) as connect'; $this->_select = '( SELECT g.`name` FROM `'._DB_PREFIX_.'group_lang` g LEFT JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = g.`id_group`) WHERE g.`id_group` != 1 AND g.`id_lang`=1 AND cg.`id_customer` = a.id_customer ) as company'; $genders = array(1 => $this->l('M'), 2 => $this->l('F'), 9 => $this->l('?')); $this->fieldsDisplay = array( 'id_customer' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'company' => array('title' => $this->l('Company'), 'width' => 80), 'id_gender' => array('title' => $this->l('Gender'), 'width' => 25, 'align' => 'center', 'icon' => array(1 => 'male.gif', 2 => 'female.gif', 'default' => 'unknown.gif'), 'orderby' => false, 'type' => 'select', 'select' => $genders, 'filter_key' => 'a!id_gender'), 'company' => array('title' => $this->l('Company'), 'width' => 80), 'lastname' => array('title' => $this->l('Last Name'), 'width' => 80), 'firstname' => array('title' => $this->l('First name'), 'width' => 60), 'email' => array('title' => $this->l('E-mail address'), 'width' => 120, 'maxlength' => 19), 'age' => array('title' => $this->l('Age'), 'width' => 30, 'search' => false), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), 'newsletter' => array('title' => $this->l('News.'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'callback' => 'printNewsIcon', 'orderby' => false), 'optin' => array('title' => $this->l('Opt.'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'callback' => 'printOptinIcon', 'orderby' => false), 'date_add' => array('title' => $this->l('Registration'), 'width' => 30, 'type' => 'datetime', 'align' => 'right'), 'connect' => array('title' => $this->l('Connection'), 'width' => 60, 'type' => 'datetime', 'search' => false)); $this->optionTitle = $this->l('Customers options'); $this->_fieldsOptions = array( 'PS_PASSWD_TIME_FRONT' => array('title' => $this->l('Regenerate password:'), 'desc' => $this->l('Security minimum time to wait to regenerate the password'),'validation' => 'isUnsignedInt', 'cast' => 'intval', 'size' => 5, 'type' => 'text', 'suffix' => ' '.$this->l('minutes')) ); parent::__construct(); } J'ai donc essayé de le faire sur Admin Orders. Mais, je n'ai alors que les groupes qui s'affichent. Je pense qu'il faut intégrer le LEFT JOIN dans la balise mais un peu d'aide serait pas mal Merci d'avance global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; $this->_select = ' a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new, (SELECT COUNT(od.`id_order`) FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number'; $this->_select = '( SELECT g.`name` FROM `'._DB_PREFIX_.'group_lang` g LEFT JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = g.`id_group`) WHERE g.`id_group` != 1 AND g.`id_lang`=1 AND cg.`id_customer` = a.id_customer ) as company'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (oh.`id_order` = a.`id_order`) LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($cookie->id_lang).')'; $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; $statesArray = array(); $states = OrderState::getOrderStates((int)($cookie->id_lang)); foreach ($states AS $state) $statesArray[$state['id_order_state']] = $state['name']; $this->fieldsDisplay = array( 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'company' => array('title' => $this->l('Company'), 'width' => 80), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => 100), 'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false)); parent::__construct(); }
-
[BO] Get group name in order list (near customer name)
neastea18 replied to ang3lx's topic in Core developers
Hello, I tried to set the group name in the order list I changed the code from : $this->_select = ' a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new, (SELECT COUNT(od.`id_order`) FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (oh.`id_order` = a.`id_order`) LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($cookie->id_lang).')'; $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; to this $this->_select = ' a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new, (SELECT COUNT(od.`id_order`) FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number'; $this->_select = '( SELECT g.`name` FROM `'._DB_PREFIX_.'group_lang` g LEFT JOIN `'._DB_PREFIX_.'customer_group` cg ON (cg.`id_group` = g.`id_group`) WHERE g.`id_group` != 1 AND g.`id_lang`=1 AND cg.`id_customer` = a.id_customer ) as company'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (oh.`id_order` = a.`id_order`) LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)($cookie->id_lang).')'; $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; but only the groups appear and all the other informations are unavailable so I presume that this query should be integrated but how ? PS: This code works great in the AdminCustomers.php -
[OVERRIDE] [CLASS] Facture PDF améliorée pour PS1.4.x
neastea18 replied to Mellow's topic in Modules et thèmes gratuits
Bonjour Mellow, Merci de ton aide, je vais regarder tout ça -
[OVERRIDE] [CLASS] Facture PDF améliorée pour PS1.4.x
neastea18 replied to Mellow's topic in Modules et thèmes gratuits
Bonsoir à tous, j'ai "joué" avec cette modification qui est géniale. Je cherche à mettre un texte comme l'éco-taxe mais sous le texte de la description. (product_name) Voici le code que je souhaite intégrer $this->SetFont(self::fontname(), 'B', 6); for($i=1;$i<$product['product_quantity']+1;$i++){ $sql="SELECT `numero` FROM `"._DB_PREFIX_."numero_de_serie` where `id_product`='".$product['product_id']."' and `id_order`='".self::$order->id."' and `quantite`='".$i."';"; if($result=Db::getInstance()->ExecuteS($sql) and $result[0]['numero']!=''){ $num=array("KL22FFF","KL55555","KL8685","KL96584"); if($delivery) $this->SetX(10); else $this->SetX(10); $this->Cell(50, 4, self::l('Numero de serie').' '.$i." : ".$result[0]['numero'], 'N'); $this->Ln(); } } $this->SetFont(self::fontname(), '', 8); Je pense que je dois insérer ma modification avant ce code (ligne 906) $before = $this->GetY(); $this->MultiCell($w[++$i],6, Tools::iconv('utf-8', self::encoding(), $product['product_name']), 'LRB'); je pense que je dois reprendre ce code mais, quelque chose m'échappe ... if (!$delivery) { // Mellow : Gestion de l'affichage de l'ecotaxe si present if (self::$_priceDisplayMethod != PS_TAX_EXC AND $product['ecotax'] != 0 AND $Show_Value_Ecotax == 1) { // Calcul de l'ecotaxe reelle a partir de $product['ecotax'] et $product['ecotax_tax_rate'] $unit_ecotax = $product['ecotax'] * (1 + $product['ecotax_tax_rate'] / 100); // On ecrit d'abord une case vide pour dessiner les bordures et conserver la structure du tableau $beforeX = $this->GetX(); $beforeY = $this->GetY(); $this->Cell($w[++$i], $lineSize, ' ', 'LRB', 0, 'R'); $afterX = $this->GetX(); $afterY = $this->GetY(); // Retour dans la case vide pour ecrire le prix unitaire (legerement plus haut) $this->SetXY($beforeX, $beforeY -0.9); $this->SetFont(self::fontname(), '', 8); // <= Taille du texte $this->Cell($w[$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice($unit_price, self::$currency, true)), 0, 0, 'R'); // Puis ecriture de l'ecotaxe juste en dessous $this->SetXY($beforeX, $beforeY +1.7); $this->SetFont(self::fontname(), '', 5.5); // <= Taille du texte $this->SetTextColor(0,150,0); // <= Couleur du texte $this->Cell($w[$i], $lineSize, '('.self::l('include').' '.self::convertSign(Tools::displayPrice($unit_ecotax, self::$currency, true)).' '.self::l('for ecotax').')', 0, 0, 'R'); // Et retour en fin de case pour continuer le tableau $this->SetFont(self::fontname(), '', 8); $this->SetTextColor(0,0,0); $this->SetXY($afterX, $afterY); } else $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice($unit_price, self::$currency, true)), 'LRB', 0, 'R'); } Merci par avance de l'aide possible -
[BO] Get group name in order list (near customer name)
neastea18 replied to ang3lx's topic in Core developers
Hello, I am looking for the same function in AdminCustomers This topic could be a good inspiration, http://www.prestashop.com/forums/topic/23928-how-easy-is-it-to-add-company-name-to-the-customers-list-in-the-back-office/ Sincerely -
[OVERRIDE] [CLASS] Facture PDF améliorée pour PS1.4.x
neastea18 replied to Mellow's topic in Modules et thèmes gratuits
Bonsoir, Bravo pour le travail ! Je voulais savoir si c'était possible d'envisager l'intégration de l'override PDF.php de cette discussion http://www.prestashop.com/forums/topic/193279-envoi-cgv-avec-mail-confirmation-de-commande/ à savoir les CGV à la suite de la facture ? Cordialement, -
Bonjour à tous, je souhaite, comme beaucoup de marchands, proposer la possibilité de s'inscrire/se connecter à ma boutique via les réseaux sociaux. J'ai donc acheté un module sur addons.prestashop.com mais, celui-ci souffre de graves problèmes de conceptions notamment sur la partie twitter. Je sollicite donc un prestataire pour réaliser un module permettant la connection à des réseaux sociaux en se basant sur le projet suivant https://github.com/uzyn/opauth Je peux transmettre le reste du cahier des charges par mail ou MP. Cependant, je souhaite une fois ce module réalisé (dans la limite de mes moyens) en faire un module open-source afin que chacun l'améliore. Cordialement,
-
Bonsoir à tous, tout d'abord, merci à antadis pour avoir mis à jour le module. J'essaye de le mettre à jour pour Prestashop (Revision SVN 15812 de AdminModules) Cependant, j'ai un souci. Dans le fichier original de Prestashop on : ligne 514: public function displayList() $modules = Module::getModulesOnDisk(true); Alors que dans le fichier de antadis, on a: $modules = $this->_getModules(); avec la fonction: private function _getModules() { global $cookie; $modulesOnDisk = Module::getModulesOnDisk(); $modules = array(); foreach ($modulesOnDisk as $module) if ($this->_isViewable($module)) $modules[] = $module; return $modules; } Du coup, on permet pas mal d'infos sur les erreurs de modules. Quelqu'un a-t'il réussi à corriger ce souci ? Merci d'avance
-
[breadcrumb] Réduire le nombre de catégories
neastea18 replied to neastea18's topic in PrestaShop pour les développeurs
Bonjour, dans mon cas, en reprenant l'exemple du début, c'est le nom du produit qui est coupé. Cependant, votre code m'inspire sur une condition sur le nombre de catégorie en utilisant la variable $nCategories Malheureusement, je ne vois pas la solution ... Si quelqu'un pouvait me donner un coup de pouce Merci d'avance