Jump to content

nadie

Global Moderators
  • Posts

    40,814
  • Joined

  • Last visited

  • Days Won

    371

nadie last won the day on June 30 2023

nadie had the most liked content!

About nadie

  • Birthday 12/04/1988

Contact Methods

Profile Information

  • Location
    Murcia
  • Activity
    Other

Recent Profile Visitors

148,468,316 profile views

nadie's Achievements

  1. Suponiendo que estés usando PrestaShop 1.7 con la plantilla por defecto. Revisa en la pestaña Internacional - Ubicaciones Geográficas - Países => Editar País Tengas añadido en el formato de dirección el postcode y señalado ¿Necesita código postal/Zip? => SÍ Adjunto Captura Si lo tienes configurado como te digo y no te funciona, comprueba en caso de que no estés usando la plantilla por defecto, si te ocurre lo mismo con la plantilla por defecto para ir descartando.
  2. Hi Enable debug mode Try again to proceed with the order process and tell me if it shows more information of the error to be identify it
  3. Pincha el botón de "Pedir Nuevo" (en realidad el título del botón debería ser "reordenar" pero la traducción por defecto del título del botón no es fina por el momento) Y revisa si te deja. Por otro lado, revisa si en tu versión de PS tienes aplicado este parche: https://github.com/PrestaShop/PrestaShop/pull/14879/files (src/Adapter/Product/AdminProductDataUpdater.php) de un bug que salio en el tema de ordenación de productos.
  4. Asegurate al 100% de que tengas bien configurado los datos de conexión a la base de datos (en caso contrario puedes contactar con tu empresa de alojamiento y preguntarles). Si quieres pega captura en el foro de los datos que tienes configurados (excepto password por seguridad D) y los que te aparecen en el panel de tu hosting y lo vamos viendo. PS 1.6 => /config/settings.inc.php (imagino que usas PS 1.6 por lo que veo en la captura) PS 1.7 => /app/config/parameters.php Si usas PS 1.7 elimina o renombra directorios directorios /dev/ y /prod/ que encontrarás en la carpeta /var/app/cache/ (no te preocupes, se vuelven a generar) Por otro lado ¿Qué versión de PHP estás usando en el servidor? (Revisa ese aspecto) Ah y comentame también la versión exacta de PS que usas.
  5. ¿Qué versión exacta de Prestashop 1.7 usas? (Edito mensaje ,veo que usas 1.7.5.2) Lo digo porque se han corregido errores relacionados: Dejo enlaces del repositorio de código: https://github.com/PrestaShop/PrestaShop/pull/14879 (Tema discusión) https://github.com/PrestaShop/PrestaShop/issues/14616 (Parche sobre fichero => src/Adapter/Product/AdminProductDataUpdater.php ) (+ añadir línea, - añadir línea) Dicen de dejar el fichero así: <?php /** * 2007-2018 PrestaShop. * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2018 PrestaShop SA * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ namespace PrestaShop\PrestaShop\Adapter\Product; use PrestaShopBundle\Service\DataUpdater\Admin\ProductInterface; use PrestaShopBundle\Exception\UpdateProductException; use PrestaShop\PrestaShop\Core\Hook\HookDispatcherInterface; use Product; use Validate; use Shop; use ShopGroup; use Category; use GroupReduction; use Pack; use Search; use Db; use Configuration; use Image; /** * This class will update/insert/delete data from DB / ORM about Product, for both Front and Admin interfaces. */ class AdminProductDataUpdater implements ProductInterface { /** * @var HookDispatcherInterface */ private $hookDispatcher; /** * Constructor. HookDispatcher is injected by Sf container. * * @param HookDispatcher $hookDispatcher */ public function __construct(HookDispatcherInterface $hookDispatcher) { $this->hookDispatcher = $hookDispatcher; } /** * {@inheritdoc} */ public function activateProductIdList(array $productListId, $activate = true) { if (count($productListId) < 1) { throw new \Exception('AdminProductDataUpdater->activateProductIdList() should always receive at least one ID. Zero given.', 5003); } $failedIdList = array(); foreach ($productListId as $productId) { $product = new Product($productId); if (!Validate::isLoadedObject($product)) { $failedIdList[] = $productId; continue; } $product->active = ($activate ? 1 : 0); $product->update(); $this->hookDispatcher->dispatchWithParameters('actionProductActivation', array('id_product' => (int) $product->id, 'product' => $product, 'activated' => $activate)); } if (count($failedIdList) > 0) { throw new UpdateProductException('Cannot change activation state on many requested products', 5004); } return true; } /** * {@inheritdoc} */ public function deleteProductIdList(array $productIdList) { if (count($productIdList) < 1) { throw new \Exception('AdminProductDataUpdater->deleteProductIdList() should always receive at least one ID. Zero given.', 5005); } $failedIdList = $productIdList; // Since we have just one call to delete all, cannot have distinctive fails. // Hooks: will trigger actionProductDelete multiple times $result = (new Product())->deleteSelection($productIdList); if ($result === 0) { throw new UpdateProductException('Cannot delete many requested products.', 5006); } return true; } /** * {@inheritdoc} */ public function duplicateProductIdList(array $productIdList) { if (count($productIdList) < 1) { throw new \Exception('AdminProductDataUpdater->duplicateProductIdList() should always receive at least one ID. Zero given.', 5005); } $failedIdList = array(); foreach ($productIdList as $productId) { try { $this->duplicateProduct($productId); } catch (\Exception $e) { $failedIdList[] = $productId; continue; } } if (count($failedIdList) > 0) { throw new UpdateProductException('Cannot duplicate many requested products', 5004); } return true; } /** * {@inheritdoc} */ public function deleteProduct($productId) { $product = new Product($productId); if (!Validate::isLoadedObject($product)) { throw new \Exception('AdminProductDataUpdater->deleteProduct() received an unknown ID.', 5005); } // dumb? no: delete() makes a lot of things, and can reject deletion in specific cases. // Hooks: will trigger actionProductDelete $result = $product->delete(); if ($result === 0) { throw new UpdateProductException('Cannot delete the requested product.', 5007); } return true; } /** * {@inheritdoc} */ public function duplicateProduct($productId, $namePattern = 'copy of %s') { //TODO : use the $namePattern var to input translated version of 'copy of %s', if translation requested. $product = new Product($productId); if (!Validate::isLoadedObject($product)) { throw new \Exception('AdminProductDataUpdater->duplicateProduct() received an unknown ID.', 5005); } $id_product_old = $product->id; if (empty($product->price) && Shop::getContext() == Shop::CONTEXT_GROUP) { $shops = ShopGroup::getShopsFromGroup(Shop::getContextShopGroupID()); foreach ($shops as $shop) { if ($product->isAssociatedToShop($shop['id_shop'])) { $product_price = new Product($id_product_old, false, null, $shop['id_shop']); $product->price = $product_price->price; } } } unset($product->id); unset($product->id_product); $product->indexed = 0; $product->active = 0; // change product name to prefix it foreach ($product->name as $langKey => $oldName) { if (!preg_match('/^' . str_replace('%s', '.*', preg_quote($namePattern, '/') . '$/'), $oldName)) { $newName = sprintf($namePattern, $oldName); if (mb_strlen($newName, 'UTF-8') <= 127) { $product->name[$langKey] = $newName; } } } if ($product->add() && Category::duplicateProductCategories($id_product_old, $product->id) && Product::duplicateSuppliers($id_product_old, $product->id) && ($combination_images = Product::duplicateAttributes($id_product_old, $product->id)) !== false && GroupReduction::duplicateReduction($id_product_old, $product->id) && Product::duplicateAccessories($id_product_old, $product->id) && Product::duplicateFeatures($id_product_old, $product->id) && Product::duplicateSpecificPrices($id_product_old, $product->id) && Pack::duplicate($id_product_old, $product->id) && Product::duplicateCustomizationFields($id_product_old, $product->id) && Product::duplicateTags($id_product_old, $product->id) && Product::duplicateDownload($id_product_old, $product->id)) { if ($product->hasAttributes()) { Product::updateDefaultAttribute($product->id); } if (!Image::duplicateProductImages($id_product_old, $product->id, $combination_images)) { throw new UpdateProductException('An error occurred while copying images.', 5008); } else { $this->hookDispatcher->dispatchWithParameters('actionProductAdd', array('id_product' => (int) $product->id, 'product' => $product)); if (in_array($product->visibility, array('both', 'search')) && Configuration::get('PS_SEARCH_INDEXATION')) { Search::indexation(false, $product->id); } return $product->id; } } else { throw new \Exception('An error occurred while creating an object.', 5009); } } /** * {@inheritdoc} */ public function sortProductIdList(array $productList, $filterParams) { if (count($productList) < 2) { return false; } if (!isset($filterParams['filter_category'])) { throw new \Exception('Cannot sort when filterParams does not contains \'filter_category\'.', 5010); } foreach ($filterParams as $k => $v) { if ($v == '' || strpos($k, 'filter_') !== 0) { continue; } if ($k == 'filter_category') { continue; } throw new \Exception('Cannot sort when filterParams contains other filter than \'filter_category\'.', 5010); } $categoryId = $filterParams['filter_category']; $minPosition = min(array_values($productList)); $productsIds = implode(',', array_map('intval', array_keys($productList))); /* Sorting items on one page only, with ONE SQL UPDATE query, * then fixing bugs (duplicates and 0 values) on next pages with more queries, if needed. * * Most complicated case example: * We have to sort items from offset 5, limit 5, on total object count: 14 * The previous AND the next pages MUST NOT be impacted but fixed if needed. * legend: #<id>|P<position> * * Before sort: * #1|P2 #2|P4 #3|P5 #7|P8 #6|P9 #5|P10 #8|P11 #10|P13 #12|P14 #11|P15 #9|P16 #12|P18 #14|P19 #22|P24 * (there is holes in positions) * * Sort request: * #5|P?? #10|P?? #12|P?? #8|P?? #11|P?? * * After sort: * (previous page unchanged) (page to sort: sort and no duplicates) (the next pages MUST be shifted to avoid duplicates if any) * * Request input: * [#5]P10 [#10]P13 [#12]P14 [#8]P11 [#11]P15 */ /* $maxPosition = max(array_values($productList)); $sortedPositions = array_values($productList); sort($sortedPositions); // new positions to update // avoid '0', starts with '1', so shift right (+1) if ($sortedPositions[1] === 0) { foreach ($sortedPositions as $k => $v) { $sortedPositions[$k] = $v + 1; } } // combine old positions with new position in an array $combinedOldNewPositions = array_combine(array_values($productList), $sortedPositions); ksort($combinedOldNewPositions); // (keys: old positions starting at '1', values: new positions) $positionsMatcher = array_replace(array_pad(array(), $maxPosition, 0), $combinedOldNewPositions); // pad holes with 0 array_shift($positionsMatcher); // shift because [0] is not used in MySQL FIELD() $fields = implode(',', $positionsMatcher); // update current pages. $updatePositions = 'UPDATE `' . _DB_PREFIX_ . 'category_product` cp INNER JOIN `' . _DB_PREFIX_ . 'product` p ON (cp.`id_product` = p.`id_product`) ' . Shop::addSqlAssociation('product', 'p') . ' SET cp.`position` = ELT(cp.`position`, ' . $fields . '), p.`date_upd` = "' . date('Y-m-d H:i:s') . '", product_shop.`date_upd` = "' . date('Y-m-d H:i:s') . '" WHERE cp.`id_category` = ' . (int) $categoryId . ' AND cp.`id_product` IN (' . implode(',', array_map('intval', array_keys($productList))) . ')'; Db::getInstance()->execute($updatePositions); // Fixes duplicates on all pages Db::getInstance()->query('SET @i := 0'); $selectPositions = 'UPDATE`' . _DB_PREFIX_ . 'category_product` cp SET cp.`position` = (SELECT @i := @i + 1) WHERE cp.`id_category` = ' . (int) $categoryId . ' ORDER BY cp.`id_product` NOT IN (' . implode(',', array_map('intval', array_keys($productList))) . '), cp.`position` ASC'; Db::getInstance()->execute($selectPositions); */ Db::getInstance()->query('SET @i := ' . (((int) $minPosition) - 1)); $updatePositions = 'UPDATE `' . _DB_PREFIX_ . 'category_product` cp ' . 'SET cp.`position` = (SELECT @i := @i + 1) ' . 'WHERE cp.`id_category` = ' . (int) $categoryId . ' AND cp.`id_product` IN (' . $productsIds . ') ' . 'ORDER BY FIELD(cp.`id_product`, ' . $productsIds . ')'; Db::getInstance()->query($updatePositions); /** * Second request to update date_upd because * ORDER BY is not working on multi-tables update */ $updateProducts = 'UPDATE `' . _DB_PREFIX_ . 'product` p ' . '' . Shop::addSqlAssociation('product', 'p') . ' ' . 'SET ' . ' p.`date_upd` = "' . date('Y-m-d H:i:s') . '", ' . ' product_shop.`date_upd` = "' . date('Y-m-d H:i:s') . '" ' . 'WHERE p.`id_product` IN (' . $productsIds . ') '; Db::getInstance()->query($updateProducts); return true; } } Ese fichero es uno que tengo de la 1.7.5.1, modificando según parámetros que recomiendan en el parche. ****** Inicialmente por lo que veo lo tienes bien configurado. Imagino que has probado (aunque no tenga que seguramente nada que ver) si te ocurre lo mismo con la plantilla por defecto Una cosa, Prueba lo siguiente, en el módulo "Navegación por facetas" la opción que dice: Mostrar productos de las subcategorías (desactívalo y revisa si te ordena bien los productos ahora en el front) Adjunto Imagen Lo digo porque si tienes esa opción configurada al meterte en las categorías X verás directamente listado los productos de todas las subcategorías y quizás eso te esté creando confusión. Ahora intenta en Catálogo => Productos probar la ordenación de nuevo, pero fijate que estés ordenando productos de la categoría (principal) asociada a los productos en cuestión. Adjunto capturas Fijate bien donde dice "Categoría" que concuerden. Por supuesto, entiendo que en la pestaña Parámetros de la tienda => Configuración de los Productos" tienes configurado Ordenar productos por => Posición dentro de la categoría Adjunto captura Me explico: Si el producto tiene asociada categoría por defecto => tomates y además está metido en chorizos y luego tienes otro producto que tiene chorizos como principal, y tomates como secundaria, ambos productos no se encuentran en la categoría principal tomates. Deja ambos en el raiz de chorizos y luego como secundaria tomates según de donde sea.. Haz esa prueba y dime. AdminProductDataUpdater.php
  6. Good night ) I guess after a month you have solved the problem. Otherwise, I'll tell you under Prestashop 1.7 with the default template to remove the link (Contact Us) only from the header You have several options Hide the link code in the tpl of the module File => /themes/your_template/modules/ps_contactinfo/nav.tpl Search for the following code: {if $contact_infos.phone} {* [1][/1] is for a HTML tag. *} {l s='Call us: [1]%phone%[/1]' sprintf=[ '[1]' => '<span>', '[/1]' => '</span>', '%phone%' => $contact_infos.phone ] d='Shop.Theme.Global' } {else} <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> {/if} Leave the code like this: {if $contact_infos.phone} {* [1][/1] is for a HTML tag. *} {l s='Call us: [1]%phone%[/1]' sprintf=[ '[1]' => '<span>', '[/1]' => '</span>', '%phone%' => $contact_infos.phone ] d='Shop.Theme.Global' } {* {else} <a href="{$urls.pages.contact}">{l s='Contact us' d='Shop.Theme.Global'}</a> *} {/if} I use {* *} for comment to comment the code. Once the file has been saved clear the cache in Advanced Parameters => Performance By the way, If you add or configure the store phone in the panel, the link to the contact form in the header is not shown 2. Other choice => Remove module (ps_contactinfo) only from header Tab Design -> Positions => Hook displayNav1 => Unhook module (Contact information/ps_contactinfo) ************** Information tested in PS 1.7.6.1 under the default template I prefer option 1 ---- By the way.. Maybe you're wondering... ¿Why not simply uninstall the module? because the module shows information in the footer then if you uninstall the module the contact information in the footer will not be displayed
  7. Aunque esta añadido en el pinned del foro, lo comento por aquí de todos modos. Prestashop publica finalmente un artículo relacionado con el problema en el blog de desarrolladores: http://build.prestashop.com/news/fighting-against-spamming-again/. En las proximas variantes tanto de Prestashop 1.6.X como de 1.7.X vendrá aplicado el parche por defecto. En este enlace del repositorio de código oficial: https://github.com/PrestaShop/PrestaShop/pull/13549 . (https://github.com/PrestaShop/PrestaShop/pull/13549/commits) podéis ver (por ejemplo) un parche para Prestashop 1.7.X. Digo oficial...
  8. Hello, I understand the user @ttoine. It is not easy to manage a community. Under my personal experience in the past in the forums, it's difficult for everyone to agree on everything. The important thing is to find positive situations that allow a union of the community. I think we are much better now than at the end of 2016. The important thing is to keep moving forward. In my personal opinion, a users (in general) must have an ethical and responsible behavior with the community. It does not matter if you are a moderator, or a new user. When a user collaborates with the community (forums, github, translations, ..) it does so with an open sense. It is clear that each person has their personality and ideas but the important thing is to maintain respect for both parties.
  9. Desde el sábado -yo lo detecte el sábado-, posiblemente unos días antes, se están detectando registros fraudulentos en distintas tiendas. Este tema, es recopilatorio, dejare el tema creado por @gusman126 al final de la entrada para que vayáis discutiendo. Foro inglés: doekia comenta una posible solución Vídeo creado por @gusman126 Tema en el foro español para discutir el problema => Artículo (oculto) en mi blog personal: https://victor-rodenas.com/spam-en-el-formulario-de-registro-en-prestashop/ Cualquier otra novedad, o tema nuevo relacionado, o información oficial por parte de Prestashop, la intentare notificar en este tema. Dicho esto, recordar que os he dejado más arriba el enlace del tema creado por @gusman126 para que vayáis comentando. ----------------- Actualizado el artículo con más información Módulo gratis de FactoriaDigital que crea los overrides necesarios sin tener que tocar código. ---------------- Actualizo con más información, en el repositorio oficial de código de PrestaShop queda abierta la incidencia => https://github.com/PrestaShop/PrestaShop/issues/13524 y PrestaShop se compromete a sacar un parche "oficial". ------ Vuelvo a actualizar con más información. Prestashop publica finalmente un artículo relacionado con el problema en el blog de desarrolladores: http://build.prestashop.com/news/fighting-against-spamming-again/. En las proximas variantes tanto de Prestashop 1.6.X como de 1.7.X vendrá aplicado el parche por defecto. En este enlace del repositorio de código oficial: https://github.com/PrestaShop/PrestaShop/pull/13549 . (https://github.com/PrestaShop/PrestaShop/pull/13549/commits) podéis ver (por ejemplo) un parche para Prestashop 1.7.X
  10. Una opción que aplicaba hace unos años era la siguiente: El cliente pagaba un porcentaje por tarjeta de crédito y el resto por contrareembolso, de este modo, te asegurabas de que el cliente estuviera seguro de comprar el producto, ya que al menos te daba una señal y eso implicaba responsabilidad por parte del comprador. En su momento (te digo de hace unos 5 años) para un cliente, hice una ampliación del módulo de redsys, que, por un lado, permitía configurar el porcentaje a pagar por tarjeta de crédito (mediante dicha pasarela) y por otro lado el porcentaje a pagar por contrareembolso. Este módulo, se ha quedado antiguo, y ahora mismo no tiene utilidad, tampoco sé dónde para (ha pasado mucho tiempo), pero bueno te comento la idea, para que lo tengas en cuenta. Ahora mismo, no recuerdo de memoria si en la tienda de módulos y plantillas de Prestashop (https://addons.prestashop.com) tienen un módulo que simulara dicha función. Sino encuentras nada, siempre puedes abrir una petición de trabajo en el foro => https://www.prestashop.com/forums/forum/101-ofertas-de-trabajo/ Saludos,
  11. Acabo de entrar a tu tienda, y he probado con el plugin (extensión) Tag Assistant en Google Chrome para ver si detecta la etiqueta y en principio si la detecta. Adjunto captura de tu tienda.
  12. I have created a module review (guide) for the Spanish community => https://victor-rodenas.com/crear-y-gestionar-un-glosario-en-prestashop/ @zeltron2k3 On the other hand, the language problem is still valid even with the proposed modification, but I did not have time to look at the code of the module. When you have more than 1 language installed in the store, double row in the administration panel. Sorry for my english
  13. +1 I have been told by many users who have the same problem, both new users and active users in the forum. On the other hand, spam seems to keep appearing. Sorry for my English
  14. Edit class the module and block when it is on that specific page in the hook 'x' for example, no show module 'x' when you are in the content page (cms) with id 6 => https://victor-rodenas.com/ocultar-modulo-por-pagina-de-contenido-en-prestashop-1-7/ For product id 6 $id_product = Tools::getValue('id_product'); if ($id_product==6) return; By the way, you have written in a topic of the year 2012, the normal thing is to create a new topic for the doubt. Sorry for my English ----
  15. I'm testing the module to do a review. When you add an item in the glossary, it appears as a duplicate row in the admin panel Attached capture (backoffice) FrontOffice is correct but backoffice no show valours correct Test for Prestashop 1.6.1.23 PD: It's just an observation for you to review the module code Thanks for the contribution of the module update. Long live Prestashop Sorry for my English
×
×
  • Create New...