
GaetanV
New Members-
Posts
14 -
Joined
-
Last visited
Everything posted by GaetanV
-
Hi, When I am in a multi-store context, the products appear twice on the "Products" page. The first occurrence displays the correct quantity and the second displays the correct status. (first image) In the context of a store the product is only displayed once and with the correct informations. (second image) Has anyone ever had this problem? Thank you for your help,
-
Bonjour à tous, Je viens de m’apercevoir que des fichiers étaient apparus dans le thème enfant de l'une de mes multiboutiques. Comme vous pouvez le voir sur l'image ci-dessus, plusieurs dossiers ont été créés dans mon dossier /themes/monthemeenfant/modules/ sans que j'intervienne. Ces nouveau dossiers contiennent tous un dossier /mails/en/ et certains contiennent un dossier /mails/fr/ contenant des fichiers mail. Le fichiers contrôlés sont identiques à ceux que l'on trouve dans le dossier du module correspondant, exemple : modules\chronopost\mails\en\return.html est identique à "themes\monthemeenfant\modules\chronopost\mails\en\return.html" Ces fichiers n'ont été créés que sur un seul thème enfant, les thèmes enfants des autres multiboutiques n'ont pas changé. Avant que je supprime tout ceci et que je sécurise mes accès ftp, voyez-vous une raison technique à ce que ces documents soient apparus ? Je vous remercie pour votre aide, Cordialement, Gaetan
-
Je vais commencer par essayer de comprendre le fonctionnement de Prestashop en multi-boutiques pour voir si j'ai un bug. Pouvez-vous m'aider en répondant à la question ci-dessous s'il vous plait ? Normalement, lorsque je modifie ma catégorie, si je décoche une boutique dans le champ "Boutiques associées", cette catégorie devrait ne plus être visible/accessible sur le front de la boutique décochée. Est-ce que je suis dans le vrai ? Merci
-
Bonjour, Je suis sur Prestashop 1.7.8.8. Je viens de constater un problème vraiment étonnant ! Ma boutique A est liée aux catégories Cat 1 et Cat 2 Ma boutique B est liée seulement à Cat 2. Mais lorsque je me rends sur le front office de ma boutique B, je vois les produits de la catégorie 1. En allant dans admin/catalogue/catégories/Cat 1/Modifier, je vois bien la CAT 1 décochée. Par contre, en me rendant sur Parametres avancés/Multiboutique/boutique B, toutes les catégories associées sont cochées. Si je décoche la Cat 1, que j'enregistre et que je reviens sur Parametres avancés/Multiboutique/boutique B, la Cat 1 est à nouveau cochée. Et évidemment mes produits de la cat 1 sont toujours visibles sur la boutique B et la cat 1 est toujours accessible 🤨 Est-ce que quelqu'un aurait une idée de ce qui se passe avec mon site ? Je vous remercie pour votre aide 😊
-
Recherche par reference de déclinaison
GaetanV replied to GaetanV's topic in Recherche d'un module ou d'un thème
Je vous remercie CedCommerce Team, je ne cherche pas à faire développer une solution sur mesure, je voulais simplement savoir si cette fonction pouvait être intégrée facilement, mais apparemment ce n'est pas le cas... 😅 -
Recherche par reference de déclinaison
GaetanV posted a topic in Recherche d'un module ou d'un thème
Bonjour à tous, Savez vous s'il existe une solution pour que : - lorsque l'on fait une recherche par référence ou par ean, - que cette référence ou cet EAN correspond à une déclinaison de produit, - que le résultat de recherche fasse le lien directement vers la déclinaison correspondant à la déclinaison recherchée (et non vers la déclinaison par défaut du produit). Je vous remercie pour votre aide :) -
[Resolved] Pack display if item of pack searched
GaetanV replied to GaetanV's topic in Looking for a module or a theme
Thank you, I have indeed created a script to automatically generate the keywords from the titles and references of the products making up the packs. I'm quite surprised that no one has already thought of adding this feature... Regards, Gaetan -
[Resolved] Pack display if item of pack searched
GaetanV replied to GaetanV's topic in Looking for a module or a theme
Thank you Zikodk but the searched words "Hampmåtte" and "Bakke" are in the title of the packs so it is normal that they appear in the search results. What I need is to display the pack in the search results even if the word is not present in the product "pack", but is present in one of the items that make up the pack. Regards -
Hello all, Do you know of a mod that does the display of packs in searches for the products that compose it? example: I have a pack (ref "ABCD") composed of two products: Product 1 (ref "1234") product 2 (with ref "7890"). I would like, when searching for "1234" that the "ABCD" pack be displayed in the search results. Regards, Gaetan
-
[solved] Faceted module missing features (without predefined values)
GaetanV replied to GaetanV's topic in Bug reports
Problem fixed... The faceted module does not allow searching on characteristics that do not have predefined values. To avoid this behavior, you must authorize the module to list the characteristics that do not have default values by overriding the file: modules\ps_facetedsearch\ps_facetedsearch.php For this add the file: override\modules\ps_facetedsearch\ps_facetedsearch.php With this content: <?php class Ps_FacetedsearchOverride extends Ps_Facetedsearch { /** * @var int */ private $psLayeredFullTree; public function getContent() { global $cookie; $message = ''; if (Tools::isSubmit('SubmitFilter')) { if (!Tools::getValue('layered_tpl_name')) { $message = $this->displayError($this->trans('Filter template name required (cannot be empty)', [], 'Modules.Facetedsearch.Admin')); } elseif (!Tools::getValue('categoryBox')) { $message = $this->displayError($this->trans('You must select at least one category.', [], 'Modules.Facetedsearch.Admin')); } else { // Get or generate id $idLayeredFilter = (int) Tools::getValue('id_layered_filter'); if (Tools::getValue('scope')) { $this->getDatabase()->execute('TRUNCATE TABLE ' . _DB_PREFIX_ . 'layered_filter'); $categories = $this->getDatabase()->executeS( 'SELECT id_category FROM ' . _DB_PREFIX_ . 'category' ); foreach ($categories as $category) { $_POST['categoryBox'][] = (int) $category['id_category']; } } // Associate Shops if (isset($_POST['checkBoxShopAsso_layered_filter'])) { $shopList = []; foreach ($_POST['checkBoxShopAsso_layered_filter'] as $idShop => $row) { $assos[] = ['id_shop' => (int) $idShop]; $shopList[] = (int) $idShop; } } else { $shopList = [(int) $this->getContext()->shop->id]; } if (!empty($_POST['categoryBox']) && is_array($_POST['categoryBox'])) { /* Clean categoryBox before use */ $_POST['categoryBox'] = array_map('intval', $_POST['categoryBox']); $filterValues = [ 'shop_list' => $shopList, ]; foreach ($_POST['categoryBox'] as $idCategoryLayered) { $filterValues['categories'][] = $idCategoryLayered; } foreach ($_POST as $key => $value) { if (!preg_match('~^(?P<key>layered_selection_.*)(?<!_filter_)(?<!type)(?<!show_limit)$~', $key, $matches)) { continue; } $filterValues[$matches['key']] = [ 'filter_type' => (int) Tools::getValue($matches['key'] . '_filter_type', 0), 'filter_show_limit' => (int) Tools::getValue($matches['key'] . '_filter_show_limit', 0), ]; } $values = [ 'name' => pSQL(Tools::getValue('layered_tpl_name')), 'filters' => pSQL(serialize($filterValues)), 'n_categories' => (int) count($filterValues['categories']), ]; if (!$idLayeredFilter) { $values['date_add'] = date('Y-m-d H:i:s'); $sql = 'INSERT INTO ' . _DB_PREFIX_ . 'layered_filter ' . '(name, filters, n_categories, date_add, id_layered_filter) ' . 'VALUES (' . '"' . pSQL($values['name']) . '", ' . '"' . $values['filters'] . '", ' . '' . (int) $values['n_categories'] . ', ' . '"' . pSQL($values['date_add']) . '", ' . '' . $idLayeredFilter . ')'; $this->getDatabase()->execute($sql); $idLayeredFilter = (int) $this->getDatabase()->Insert_ID(); } else { $this->getDatabase()->execute( 'DELETE FROM ' . _DB_PREFIX_ . 'layered_filter_shop WHERE `id_layered_filter` = ' . (int) $idLayeredFilter ); $sql = 'UPDATE ' . _DB_PREFIX_ . 'layered_filter ' . 'SET name = "' . pSQL($values['name']) . '", ' . 'filters = "' . $values['filters'] . '", ' . 'n_categories = ' . (int) $values['n_categories'] . ' ' . 'WHERE id_layered_filter = ' . $idLayeredFilter; $this->getDatabase()->execute($sql); } if (isset($assos)) { foreach ($assos as $asso) { $this->getDatabase()->execute( 'INSERT INTO ' . _DB_PREFIX_ . 'layered_filter_shop (`id_layered_filter`, `id_shop`) VALUES(' . $idLayeredFilter . ', ' . (int) $asso['id_shop'] . ')' ); } } $this->buildLayeredCategories(); $message = $this->displayConfirmation( $this->trans('Your filter', [], 'Modules.Facetedsearch.Admin') . ' "' . Tools::safeOutput(Tools::getValue('layered_tpl_name')) . '" ' . ( !empty($_POST['id_layered_filter']) ? $this->trans('was updated successfully.', [], 'Modules.Facetedsearch.Admin') : $this->trans('was added successfully.', [], 'Modules.Facetedsearch.Admin') ) ); } } } elseif (Tools::isSubmit('submitLayeredSettings')) { Configuration::updateValue('PS_LAYERED_CACHE_ENABLED', (int) Tools::getValue('ps_layered_cache_enabled')); Configuration::updateValue('PS_LAYERED_SHOW_QTIES', (int) Tools::getValue('ps_layered_show_qties')); Configuration::updateValue('PS_LAYERED_FULL_TREE', (int) Tools::getValue('ps_layered_full_tree')); Configuration::updateValue('PS_LAYERED_FILTER_PRICE_USETAX', (int) Tools::getValue('ps_layered_filter_price_usetax')); Configuration::updateValue('PS_LAYERED_FILTER_CATEGORY_DEPTH', (int) Tools::getValue('ps_layered_filter_category_depth')); Configuration::updateValue('PS_LAYERED_FILTER_PRICE_ROUNDING', (int) Tools::getValue('ps_layered_filter_price_rounding')); Configuration::updateValue('PS_LAYERED_FILTER_SHOW_OUT_OF_STOCK_LAST', (int) Tools::getValue('ps_layered_filter_show_out_of_stock_last')); Configuration::updateValue('PS_LAYERED_FILTER_BY_DEFAULT_CATEGORY', (int) Tools::getValue('ps_layered_filter_by_default_category')); $this->psLayeredFullTree = (int) Tools::getValue('ps_layered_full_tree'); $message = '<div class="alert alert-success">' . $this->trans('Settings saved successfully', [], 'Modules.Facetedsearch.Admin') . '</div>'; $this->invalidateLayeredFilterBlockCache(); } elseif (Tools::getValue('deleteFilterTemplate')) { $layered_values = $this->getDatabase()->getValue( 'SELECT filters FROM ' . _DB_PREFIX_ . 'layered_filter WHERE id_layered_filter = ' . (int) Tools::getValue('id_layered_filter') ); if ($layered_values) { $this->getDatabase()->execute( 'DELETE FROM ' . _DB_PREFIX_ . 'layered_filter WHERE id_layered_filter = ' . (int) Tools::getValue('id_layered_filter') . ' LIMIT 1' ); $this->buildLayeredCategories(); $message = $this->displayConfirmation($this->trans('Filter template deleted, categories updated (reverted to default Filter template).', [], 'Modules.Facetedsearch.Admin')); } else { $message = $this->displayError($this->trans('Filter template not found', [], 'Modules.Facetedsearch.Admin')); } } $categoryBox = []; $attributeGroups = $this->getDatabase()->executeS( 'SELECT ag.id_attribute_group, ag.is_color_group, agl.name, COUNT(DISTINCT(a.id_attribute)) n FROM ' . _DB_PREFIX_ . 'attribute_group ag LEFT JOIN ' . _DB_PREFIX_ . 'attribute_group_lang agl ON (agl.id_attribute_group = ag.id_attribute_group) LEFT JOIN ' . _DB_PREFIX_ . 'attribute a ON (a.id_attribute_group = ag.id_attribute_group) WHERE agl.id_lang = ' . (int) $cookie->id_lang . ' GROUP BY ag.id_attribute_group' ); $features = $this->getDatabase()->executeS( 'SELECT fl.id_feature, fl.name, COUNT(DISTINCT(fv.id_feature_value)) n FROM ' . _DB_PREFIX_ . 'feature_lang fl LEFT JOIN ' . _DB_PREFIX_ . 'feature_value fv ON (fv.id_feature = fl.id_feature) WHERE fl.id_lang = ' . (int) $cookie->id_lang . ' GROUP BY fl.id_feature' ); if (Shop::isFeatureActive() && count(Shop::getShops(true, null, true)) > 1) { $helper = new HelperForm(); $helper->id = Tools::getValue('id_layered_filter', null); $helper->table = 'layered_filter'; $helper->identifier = 'id_layered_filter'; $this->context->smarty->assign('asso_shops', $helper->renderAssoShop()); } $treeCategoriesHelper = new HelperTreeCategories('categories-treeview'); $treeCategoriesHelper->setRootCategory((Shop::getContext() == Shop::CONTEXT_SHOP ? Category::getRootCategory()->id_category : 0)) ->setUseCheckBox(true); $moduleUrl = Tools::getProtocol(Tools::usingSecureMode()) . $_SERVER['HTTP_HOST'] . $this->getPathUri(); if (method_exists($this->context->controller, 'addJquery')) { $this->context->controller->addJS(_PS_JS_DIR_ . 'jquery/plugins/jquery.sortable.js'); } $this->context->controller->addJS($this->_path . 'views/dist/back.js'); $this->context->controller->addCSS($this->_path . 'views/dist/back.css'); if (Tools::getValue('add_new_filters_template')) { $this->context->smarty->assign([ 'current_url' => $this->context->link->getAdminLink('AdminModules') . '&configure=ps_facetedsearch&tab_module=front_office_features&module_name=ps_facetedsearch', 'uri' => $this->getPathUri(), 'id_layered_filter' => 0, 'template_name' => sprintf($this->trans('My template - %s', [], 'Modules.Facetedsearch.Admin'), date('Y-m-d')), 'attribute_groups' => $attributeGroups, 'features' => $features, 'total_filters' => 6 + count($attributeGroups) + count($features), ]); $this->context->smarty->assign('categories_tree', $treeCategoriesHelper->render()); return $this->display(__FILE__, 'views/templates/admin/add.tpl'); } if (Tools::getValue('edit_filters_template')) { $idLayeredFilter = (int) Tools::getValue('id_layered_filter'); $template = $this->getDatabase()->getRow( 'SELECT * FROM `' . _DB_PREFIX_ . 'layered_filter` WHERE id_layered_filter = ' . $idLayeredFilter ); if (!empty($template)) { $filters = Tools::unSerialize($template['filters']); $treeCategoriesHelper->setSelectedCategories($filters['categories']); $this->context->smarty->assign('categories_tree', $treeCategoriesHelper->render()); $selectShops = $filters['shop_list']; unset($filters['categories']); unset($filters['shop_list']); $this->context->smarty->assign([ 'current_url' => $this->context->link->getAdminLink('AdminModules') . '&configure=ps_facetedsearch&tab_module=front_office_features&module_name=ps_facetedsearch', 'uri' => $this->getPathUri(), 'id_layered_filter' => $idLayeredFilter, 'template_name' => $template['name'], 'attribute_groups' => $attributeGroups, 'features' => $features, 'filters' => $filters, 'total_filters' => 6 + count($attributeGroups) + count($features), 'default_filters' => $this->getDefaultFilters(), ]); return $this->display(__FILE__, 'views/templates/admin/view.tpl'); } } if(!isset($this->psLayeredFullTree)) { $this->psLayeredFullTree = (int) Configuration::get('PS_LAYERED_FULL_TREE');; } $this->context->smarty->assign([ 'message' => $message, 'uri' => $this->getPathUri(), 'PS_LAYERED_INDEXED' => (int) Configuration::getGlobalValue('PS_LAYERED_INDEXED'), 'current_url' => Tools::safeOutput(preg_replace('/&deleteFilterTemplate=[0-9]*&id_layered_filter=[0-9]*/', '', $_SERVER['REQUEST_URI'])), 'id_lang' => $this->getContext()->cookie->id_lang, 'token' => substr(Tools::hash('ps_facetedsearch/index'), 0, 10), 'base_folder' => urlencode(_PS_ADMIN_DIR_), 'price_indexer_url' => $moduleUrl . 'ps_facetedsearch-price-indexer.php' . '?token=' . substr(Tools::hash('ps_facetedsearch/index'), 0, 10), 'full_price_indexer_url' => $moduleUrl . 'ps_facetedsearch-price-indexer.php' . '?token=' . substr(Tools::hash('ps_facetedsearch/index'), 0, 10) . '&full=1', 'attribute_indexer_url' => $moduleUrl . 'ps_facetedsearch-attribute-indexer.php' . '?token=' . substr(Tools::hash('ps_facetedsearch/index'), 0, 10), 'clear_cache_url' => $moduleUrl . 'ps_facetedsearch-clear-cache.php' . '?token=' . substr(Tools::hash('ps_facetedsearch/index'), 0, 10), 'filters_templates' => $this->getDatabase()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'layered_filter ORDER BY date_add DESC'), 'show_quantities' => Configuration::get('PS_LAYERED_SHOW_QTIES'), 'cache_enabled' => Configuration::get('PS_LAYERED_CACHE_ENABLED'), 'full_tree' => $this->psLayeredFullTree, 'category_depth' => Configuration::get('PS_LAYERED_FILTER_CATEGORY_DEPTH'), 'price_use_tax' => (bool) Configuration::get('PS_LAYERED_FILTER_PRICE_USETAX'), 'limit_warning' => $this->displayLimitPostWarning(21 + count($attributeGroups) * 3 + count($features) * 3), 'price_use_rounding' => (bool) Configuration::get('PS_LAYERED_FILTER_PRICE_ROUNDING'), 'show_out_of_stock_last' => (bool) Configuration::get('PS_LAYERED_FILTER_SHOW_OUT_OF_STOCK_LAST'), 'filter_by_default_category' => (bool) Configuration::get('PS_LAYERED_FILTER_BY_DEFAULT_CATEGORY'), ]); return $this->display(__FILE__, 'views/templates/admin/manage.tpl'); } } the only modification made in the new field is the replacement of the request: $features = $this->getDatabase()->executeS( 'SELECT fl.id_feature, fl.name, COUNT(DISTINCT(fv.id_feature_value)) n FROM ' . _DB_PREFIX_ . 'feature_lang fl LEFT JOIN ' . _DB_PREFIX_ . 'feature_value fv ON (fv.id_feature = fl.id_feature) WHERE (fv.custom IS NULL OR fv.custom = 0) AND fl.id_lang = ' . (int) $cookie->id_lang . ' GROUP BY fl.id_feature' ); By: $features = $this->getDatabase()->executeS( 'SELECT fl.id_feature, fl.name, COUNT(DISTINCT(fv.id_feature_value)) n FROM ' . _DB_PREFIX_ . 'feature_lang fl LEFT JOIN ' . _DB_PREFIX_ . 'feature_value fv ON (fv.id_feature = fl.id_feature) WHERE fl.id_lang = ' . (int) $cookie->id_lang . ' GROUP BY fl.id_feature' ); All features are now accessible from the faceted module backoffice 😉 Edit : Attention ! All custom values will be displayed, even if several custom values are identical, they will all be displayed. -
Bonjour à tous, Mon site est en multi-boutiques. J'ai à plusieurs reprises, par erreur, créé un produit dans le contexte d'une boutique alors que j'aurais aimé le faire dans le contexte "toutes les boutiques". En conséquence, le produit créé n'est pas visible dans la liste des produits si je suis dans le contexte "multi-boutiques". Il n'est donc pas en vente sur toutes les boutiques. J'ai essayé de me rendre sur la page d'édition du produit, de passer en contexte "multi-boutiques" puis de remplir les champs et d'activer la fiche dans ce contexte mais il reste invisible sur les autres boutiques ainsi que dans la liste des produits du contexte multi-boutiques. Auriez-vous une solution pour ne pas avoir à supprimer puis recréer ma fiche produit lorsque je me suis trompé de contexte lors de sa création ? Je vous remercie pour votre aide Gaetan