-
Posts
31 -
Joined
-
Last visited
Pixel carré's Achievements
Newbie (1/14)
0
Reputation
-
Problème ajout image de produits
Pixel carré replied to html2's topic in PrestaShop Download : installation et mise à jour
Bonjour, je rencontre le même problème et aucunes des solutions proposées ne fonctionne chez moi... ! La requête SQL m'affiche : "MySQL a retourné un résultat vide (aucune ligne)." Je suis en 1.6.1.11 et en multiboutique. Quelle galère ! D'autres solutions trouvées depuis ? D'avance merci -
Bonjour, je relance ce sujet car j'ai ce problème sur plusieurs boutiques... les mails envoyés depuis Prestashop arrivent dans le courrier indésirables sur les boîtes mail Microsoft. Chez les autres ça passe ! Le lien fourni par Gordak ne fonctionne plus... est-ce que quelqu'un connait la marche à suivre auprès de Microsoft afin de "blanchir" nos domaine svp ?
- 15 replies
-
- problemes mail prestashop
- outlook
-
(and 2 more)
Tagged with:
-
Bonjour, J'utilise Prestashop en multiboutique et j'ai besoin d'envoyer un mail de confirmation de création de compte client différent selon la boutique. Je ne vois pas de moyen de faire cela, dans la mesure ou les mails ne se trouve pas dans un thème spécifique... Quelqu'un aurait une solution, si possible sans passer par un module ? D'avance merci.
-
Et voilà : public static function getPricesDrop($id_lang, $page_number = 0, $nb_products = 10, $count = false, $order_by = null, $order_way = null, $beginning = false, $ending = false, Context $context = null) { $excluded_categories = array(12,13); //array(5,6,7); $exclude_condition = ''; if (is_array($excluded_categories)) { $exclude_condition = 'AND p.id_product NOT IN ( SELECT DISTINCT id_product FROM '._DB_PREFIX_.'category_product WHERE id_category IN('.implode(',', $excluded_categories).'))'; } if (!Validate::isBool($count)) { die(Tools::displayError()); } if (!$context) { $context = Context::getContext(); } if ($page_number < 0) { $page_number = 0; } if ($nb_products < 1) { $nb_products = 10; } if (empty($order_by) || $order_by == 'position') { $order_by = 'price'; } if (empty($order_way)) { $order_way = 'DESC'; } if ($order_by == 'id_product' || $order_by == 'price' || $order_by == 'date_add' || $order_by == 'date_upd') { $order_by_prefix = 'product_shop'; } elseif ($order_by == 'name') { $order_by_prefix = 'pl'; } if (!Validate::isOrderBy($order_by) || !Validate::isOrderWay($order_way)) { die(Tools::displayError()); } $current_date = date('Y-m-d H:i:00'); $ids_product = Product::_getProductIdByDate((!$beginning ? $current_date : $beginning), (!$ending ? $current_date : $ending), $context); $tab_id_product = array(); foreach ($ids_product as $product) { if (is_array($product)) { $tab_id_product[] = (int)$product['id_product']; } else { $tab_id_product[] = (int)$product; } } $front = true; if (!in_array($context->controller->controller_type, array('front', 'modulefront'))) { $front = false; } $sql_groups = ''; if (Group::isFeatureActive()) { $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = ' AND EXISTS(SELECT 1 FROM `'._DB_PREFIX_.'category_product` cp JOIN `'._DB_PREFIX_.'category_group` cg ON (cp.id_category = cg.id_category AND cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1').') WHERE cp.`id_product` = p.`id_product`)'; } if ($count) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' SELECT COUNT(DISTINCT p.`id_product`) FROM `'._DB_PREFIX_.'product` p '.Shop::addSqlAssociation('product', 'p').' WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' '.((!$beginning && !$ending) ? 'AND p.`id_product` IN('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' '.$sql_groups); } if (strpos($order_by, '.') > 0) { $order_by = explode('.', $order_by); $order_by = pSQL($order_by[0]).'.`'.pSQL($order_by[1]).'`'; } $sql = ' SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name, DATEDIFF( p.`date_add`, DATE_SUB( "'.date('Y-m-d').' 00:00:00", INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY ) ) > 0 AS new FROM `'._DB_PREFIX_.'product` p '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop='.(int)$context->shop->id.') '.Product::sqlStock('p', 0, false, $context->shop).' LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl').' ) LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$context->shop->id.') LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$id_lang.') LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 '.($front ? ' AND p.`visibility` IN ("both", "catalog")' : '').' '.((!$beginning && !$ending) ? ' AND p.`id_product` IN ('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' '.$sql_groups.' ORDER BY '.(isset($order_by_prefix) ? pSQL($order_by_prefix).'.' : '').pSQL($order_by).' '.pSQL($order_way).' LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; die($sql); $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); if (!$result) { return false; } if ($order_by == 'price') { Tools::orderbyPrice($result, $order_way); } return Product::getProductsProperties($id_lang, $result); }
-
Bonjour et merci pour cette réponse bien matinale Je suis en 1.6.1.4 également et j'ai testé votre code, mais ma boutique ne s'affiche plus ! "Erreur serveur 500". J'ai copié votre code et j'ai remplacé la partie "Get prices drop" de mon fichier product.php. J'ai défini ma catégorie à exclure : $excluded_categories = 13; J'ai certainement oublié de modifier quelque chose...
-
Je suis sur une installation, sur serveur. J'ai d'ailleurs une chose étrange : J'ai un prestashop en multiboutique, sur un VPS. J'ai la boutique principale et une 2e boutique. Le live edit fonctionne sur la principale, pas sur la 2e... là c'est à rien y comprendre !
-
Bonjour, Merci pour cette réponse. Dans la partie "getPricesDrop" j'ai plusieurs fois un "WHERE" et je ne vois pas où et comment inclure votre fonction... J'ai : WHERE cp.`id_product` = p.`id_product`)'; WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 '.($front ? ' AND product_shop.`visibility` IN ("both", "catalog")' : '').' WHERE product_shop.`active` = 1 AND product_shop.`show_price` = 1 '.($front ? ' AND p.`visibility` IN ("both", "catalog")' : '').' Merci d'avance