Jump to content

Thymotep

Members
  • Posts

    38
  • Joined

  • Last visited

About Thymotep

  • Birthday 04/03/1989

Profile Information

  • Location
    Paris
  • Activity
    Module Developer

Recent Profile Visitors

2,956,286 profile views

Thymotep's Achievements

  1. Hello, Where is the solution of your problem? I have same problem but i don't find the solution and you seem to have found a solution. Thanks, Thymotep
  2. Hello guys, I post this message because I am stuck on a development that has the base seemed uncomplicated. I have a PrestaShop 1.6 with two shops. The first corresponds to North America (USA, Canada) and the second corresponds to Europe. I did not find anything in the back office to automatically redirect the user to a specific shop, depending on his country. If it's possible, do not hesitate to explain to me how. So I tried to develop that on my side, but nothing to do, I can not find the right file to do that. I tried in: config/config.inc.php, I can differentiate the country from the client with GeoIP, but it is not appropriate to modify this file. So I try to modify the initialize function of the Shop class. But at this point, I am already redirected to my "shop" by default. I see in the .htaccess that there are the records of my two shops, would it be he who does the redirection, stupidly, in the order of presence in this file? If it is, it is problematic. In any case, I take any help, or track to be able to redirect to the right shop, depending on the country. Thank you, Thymotep
  3. Thanks for this return ! This is absolutely not clear in relation to the 1.6. There should be a fourth tab "Uninstalled Modules", the selection making think of the Addons advertising. In addition, you should be able to choose the tab that you want to display by default. On a daily basis, the Selection tab is useless
  4. Bonjour, Il n'y a rien sur le lien indiqué. Si je comprends bien, vous souhaiteriez quand étant dans une catégorie, la recherche ne se base que sur cette catégorie, et pas sur l'ensemble du site ? Ce n'est pas le cas par défaut sur PrestaShop, mais çà doit pouvoir être développé, bien que ce soit contre productif selon moi (ce n'est pas habituel pour un utilisateur). Pourquoi ne pas utiliser les filtres des produits ? (Block multi facette) de PrestaShop, permettant d'afficher (pour la catégorie courante) les différentes options de vos produits (couleur, taille, prix ...) ? Quelques infos : https://www.prestashop.com/blog/fr/la-navigation-a-facette-pourquoi/ Thymotep
  5. Hello, Ton widget doit avoir un id propre à lui, qui te permet de sélectionner la class uniquement pour ce widget, par exemple : #blocktopmenu .taclass { display: inherit; } Si ce n'est pas le cas, tu peux toujours déplacer le tpl du module en question dans ton thème : /themes/tonthemes/modules/nomdumodule/fichier.tpl ou /themes/tonthemes/modules/nomdumodule/views/templates/hook/fichier.tpl Et là tu pourras le modifier pour y ajouter une class spécifique sur les éléments que tu souhaites, en cas de mise à jour du module, tu ne perdra pas ta class CSS par contre il faut vérifier les nouveautés (s'il y en a) dans le fichier tpl du module, pour les reporter dans le fichier du thème. Bien à toi, Thymotep
  6. Bonjour à tous, Je rencontre un problème pour créer une commande depuis le back-office, c'est un peu complexe, mais je vais essayer de détailler au mieux le soucis. Je possède plusieurs entrepôts, mais partons sur l'idée que j'en ai deux : Un entrepôt "Magasin" (correspondant à un magasin physique) Un entrepôt "Expédition" (logisticien pour le traitement des commandes) J'ai un produit X qui peut-être dans les deux entrepôts à la fois. L'entrepôt "prioritaire" dans la configuration, c'est celui du logisticien "Expédition". Parfois il se peut que le produit ne soit disponible que dans l'entrepôt "Magasin". En créant une commande depuis le back-office, une fois le client choisi, je recherche mon produit, et j'ai l'information du stock à 0 (correspondant à l'entrepôt "Expédition") alors que j'ai du stock au magasin. Et donc suite à cela (aucun soucis pour l'ajout au "panier"), je ne peux pas choisir de transporteur, aucun n'est disponible. Pourtant le produit n'a pas de restriction sur les transporteurs, ils sont tous disponibles, y compris le retrait en magasin. Si j'ajoute un produit en stock, je peux créer ma commande, mais du coup tous les produits sont liés au stock "Expédition" et donc la commande passe automatiquement en réapprovisionnement, alors que çà ne devrait pas être le cas, le produit étant disponible dans un des deux entrepôt. Est-ce que quelqu'un a une idée de comment régler çà ? Dois-je passer par un développement complémentaire ? Ai-je rater quelque chose ? Merci d'avance pour votre aide, N'hésitez pas à me poser des questions si çà peut aider à la compréhension du problème ! Thymotep
  7. Bonjour à tous, Je me suis permis de créer un channel français sur Telegram, pour ceux qui souhaiterai pouvoir discuter rapidement d'un sujet technique. Si cela vous intéresse, vous pouvez y accéder par ici : http://t.me/PrestaShopFR Je pense que cela peut rappeler des souvenirs aux utilisateurs d'IRC il y a quelques années Bien à vous, Thymotep
  8. Bonjour à tous, Je rencontre un soucis sur une boutique PrestaShop 1.6. Celle-ci contient des produits avec des tarifs dégressifs par quantité. Exemple : Un t-shirt à un prix de base de 10€ HT A partir de 100 unités, le prix passe à 8€ HT A partir de 500 unités, le prix passe à 6€ HT Les données sont importées via PrestaShop (pour les produits) et les prix spécifiques sont importées via un développement custom, pour venir peupler la table specific_price. Les prix dégressifs changent le prix de base de produit, il ne s'agit pas d'une remise en euros. Jusqu'à maintenance, cela fonctionne très bien. Mon problème : Pour une catégorie de produits, je souhaite appliquer une remise en pourcentage de 10%. J'ajoute donc un prix spécifique correspondant à une remise en pourcentage. Cela ne fonctionne pas, sur la boutique, seules les prix dégressifs sont prix en compte. J'ai installé une boutique neuve, et c'est l'inverse que je constate, seule la remise en pourcentage s'applique. Ma question : Peut-on faire cohabiter une remise par quantité, basée sur le prix de base du produit (et pas une réduction en montant) avec une remise en pourcentage, sur le même produit ? Merci d'avance pour votre aide et vos retours, Thymotep
  9. I solved my problem with this message : https://www.prestashop.com/forums/topic/354986-custom-product-field-not-changeable/?p=1795472
  10. No one to help me solve my problem?
  11. Hello, I want to add fields to the sheet via an override of the product class, but it does not. For Product.php in override/classes : <?php class Product extends ProductCore { public $is_marking = false; public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { self::$definition['fields']['is_marking'] = array('type' => self::TYPE_BOOL, 'validate' => 'isBool'); parent::__construct($id_product, $id_lang, $id_shop); } } For informations.tpl in override/controllers/admin/templates/products/informations.tpl, i have added these lines just after online_only checkbox : <div class="checkbox"> <label for="is_marking"> <input type="checkbox" name="is_marking" id="is_marking" value="{$product->is_marking}" {if $product->is_marking}checked="checked"{/if} > {l s='Marking product'}</label> </div> For AdminProductsController.php in /override/controllers/admin/AdminProductsController.php : <?php class AdminProductsController extends AdminProductsControllerCore { protected function copyFromPost(&$object, $table) { parent::copyFromPost($object, $table); if (get_class($object) != 'Product') return; /* Additional fields */ $languages = Language::getLanguages(false); foreach ($languages as $language) if (isset($_POST['meta_keywords_'.$language['id_lang']])) { $_POST['meta_keywords_'.$language['id_lang']] = $this->_cleanMetaKeywords(Tools::strtolower($_POST['meta_keywords_'.$language['id_lang']])); // preg_replace('/ *,? +,* /', ',', strtolower($_POST['meta_keywords_'.$language['id_lang']])); $object->meta_keywords[$language['id_lang']] = $_POST['meta_keywords_'.$language['id_lang']]; } $_POST['width'] = empty($_POST['width']) ? '0' : str_replace(',', '.', $_POST['width']); $_POST['height'] = empty($_POST['height']) ? '0' : str_replace(',', '.', $_POST['height']); $_POST['depth'] = empty($_POST['depth']) ? '0' : str_replace(',', '.', $_POST['depth']); $_POST['weight'] = empty($_POST['weight']) ? '0' : str_replace(',', '.', $_POST['weight']); if (Tools::getIsset('unit_price') != null) $object->unit_price = str_replace(',', '.', Tools::getValue('unit_price')); if (Tools::getIsset('ecotax') != null) $object->ecotax = str_replace(',', '.', Tools::getValue('ecotax')); if ($this->isTabSubmitted('Informations')) { $object->available_for_order = (int)Tools::getValue('available_for_order'); $object->show_price = $object->available_for_order ? 1 : (int)Tools::getValue('show_price'); $object->online_only = (int)Tools::getValue('online_only'); $object->is_marking = (int)Tools::getValue('is_marking'); } if ($this->isTabSubmitted('Prices')) $object->on_sale = (int)Tools::getValue('on_sale'); } public function initFormInformations($product) { if (!$this->default_form_language) $this->getLanguages(); $data = $this->createTemplate($this->tpl_form); $currency = $this->context->currency; $data->assign('languages', $this->_languages); $data->assign('default_form_language', $this->default_form_language); $data->assign('currency', $currency); $this->object = $product; //$this->display = 'edit'; $data->assign('product_name_redirected', Product::getProductName((int)$product->id_product_redirected, null, (int)$this->context->language->id)); /* * Form for adding a virtual product like software, mp3, etc... */ $product_download = new ProductDownload(); if ($id_product_download = $product_download->getIdFromIdProduct($this->getFieldValue($product, 'id'))) $product_download = new ProductDownload($id_product_download); $product->{'productDownload'} = $product_download; $product_props = array(); // global informations array_push($product_props, 'reference', 'ean13', 'upc', 'available_for_order', 'show_price', 'online_only', 'id_manufacturer', 'is_marking' ); // specific / detailled information array_push($product_props, // physical product 'width', 'height', 'weight', 'active', // virtual product 'is_virtual', 'cache_default_attribute', // customization 'uploadable_files', 'text_fields' ); // prices array_push($product_props, 'price', 'wholesale_price', 'id_tax_rules_group', 'unit_price_ratio', 'on_sale', 'unity', 'minimum_quantity', 'additional_shipping_cost', 'available_now', 'available_later', 'available_date' ); if (Configuration::get('PS_USE_ECOTAX')) array_push($product_props, 'ecotax'); foreach ($product_props as $prop) $product->$prop = $this->getFieldValue($product, $prop); $product->name['class'] = 'updateCurrentText'; if (!$product->id || Configuration::get('PS_FORCE_FRIENDLY_PRODUCT')) $product->name['class'] .= ' copy2friendlyUrl'; $images = Image::getImages($this->context->language->id, $product->id); if (is_array($images)) { foreach ($images as $k => $image) $images[$k]['src'] = $this->context->link->getImageLink($product->link_rewrite[$this->context->language->id], $product->id.'-'.$image['id_image'], 'small_default'); $data->assign('images', $images); } $data->assign('imagesTypes', ImageType::getImagesTypes('products')); $product->tags = Tag::getProductTags($product->id); $data->assign('product_type', (int)Tools::getValue('type_product', $product->getType())); $data->assign('is_in_pack', (int)Pack::isPacked($product->id)); $check_product_association_ajax = false; if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL) $check_product_association_ajax = true; // TinyMCE $iso_tiny_mce = $this->context->language->iso_code; $iso_tiny_mce = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso_tiny_mce.'.js') ? $iso_tiny_mce : 'en'); $data->assign('ad', dirname($_SERVER['PHP_SELF'])); $data->assign('iso_tiny_mce', $iso_tiny_mce); $data->assign('check_product_association_ajax', $check_product_association_ajax); $data->assign('id_lang', $this->context->language->id); $data->assign('product', $product); $data->assign('token', $this->token); $data->assign('currency', $currency); $data->assign($this->tpl_form_vars); $data->assign('link', $this->context->link); $data->assign('PS_PRODUCT_SHORT_DESC_LIMIT', Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') ? Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT') : 400); $this->tpl_form_vars['product'] = $product; $this->tpl_form_vars['custom_form'] = $data->fetch(); } } And in my database, i have added "is_marking" field in product table. The display goes well in the back office, but the value is not saved, and I do not understand why. Did I forget something? Could someone help me? thank you in advance! Thymotep
  12. Bonjour à tous, Je suis en train de développer un module spécifique sur mon Prestashop (1.6) pour la gestion de mes commandes en marque blanche, directement lié à mon fournisseur mais je coince un peu. Je me suis fais un petit workflow que voici : Page de paiement > Passage de la commande à un statut "Vérification de la commande en cours", qui en fait est l'étape où je vais créer la commande chez mon fournisseur via un webservice. Si c'est ok, je redirige le client vers la banque, pour lui, c'est transparent. Si il y a une erreur lors de la création de la commande (produit non dispo ou autres erreurs), je redirige le client vers son panier avec une notice explicative. La suite du process est classique, le client paie, je valide la commande dans Prestashop et chez mon fournisseur, ou alors il y a une erreur de paiement, et je le renvoi sur son panier. Le coin où je bloque, c'est sur l'étape AVANT le paiement, il n'y a pas de hook "beforePayment" par exemple, du coup je ne sais pas comment gérer ma commande fournisseur entre le choix du mode de paiement, et l'envoi directement sur le paiement. Si quelqu'un à une idée pour débloquer mon problème, une astuce pour la création d'un hook avant le paiement ou autre, je suis preneur ! (La finalité, c'est que si il y a une erreur de commande, le client n'est pas payé avant, pour ne pas avoir à le rembourser etc) Merci d'avance, Thymotep
  13. Bonjour, Finalement j'ai trouvé pourquoi les pages n'étaient pas présente en BO, elles n'étaient plus dans la BDD, dans la table meta_lang, mais elles étaient bien dans meta, c'est étrange mais du coup çà refonctionner ! Merci pour l'aide
  14. Moi je ne l'ai pas, je vais regarder en base de données, merci pour l'aide en tout cas, si je trouve j'indiquerai la solution.
  15. Bonsoir, Merci pour la réponse, je n'avais pas regardé ces nouveaux paramètres, effectivement çà corrige en partie mon problème, mais dans la liste des pages, il n'y a pas de page "catégories" du coup j'ai bien la sidebar, mais pas sur les catégories de produits, une idée ? Thymotep
×
×
  • Create New...