
juanmlg
Members-
Posts
80 -
Joined
-
Last visited
Everything posted by juanmlg
-
I am trying to install the module ( 1.6.1.18 PHP 7.1 ) , but I am getting this error: [PrestaShop] Fatal error in module file :/home/******/public_html/******/shop/modules/blmvuln/blmvuln.php: require_once(): Failed opening required '/home/****/public_html/****/shop/modules/blmvuln/vendor/autoload.php' (include_path='/home/****/public_html/********/shop/tools/htmlpurifier/standalone:.:/opt/cpanel/ea-php71/root/usr/share/pear')
- 87 replies
-
- cve-2022-31101
- fix
-
(and 1 more)
Tagged with:
-
Hello, in a 1.6 installation I want to hide the out of stock items ONLY in the special page ( price drop ). Any help? Thanks
-
Disable out of stock product from listing only
juanmlg replied to Dobre Ceny's topic in Core developers
Its possible to do it only in the Prices-drop.tpl? -
Buenas noches, estoy tratando de modificar el módulo de Crosselling para que los productos mostrados en la ficha de producto cumplan algunas condiciones concretas, las condiciones serían: - Que los productos aparezcan ordenados por las veces que han sido comprados junto a ese producto. - Que no muestre los productos sin stock ( esto creo que sería con "AND stock.quantity > 1" ) Creo que las modificaciones deberían ir en el archivo crossselling.php ¿Correcto? if (count($orders) > 0) { $list = ''; foreach ($orders as $order) { $list .= (int)$order['id_order'].','; } $list = rtrim($list, ','); $list_product_ids = join(',', $products_id); if (Group::isFeatureActive()) { $sql_groups_join = ' LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = product_shop.id_category_default AND cp.id_product = product_shop.id_product) LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cp.`id_category` = cg.`id_category`)'; $groups = FrontController::getCurrentCustomerGroups(); $sql_groups_where = 'AND cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '='.(int)Group::getCurrent()->id); } $order_products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT DISTINCT od.product_id, pl.name, pl.description_short, pl.link_rewrite, p.reference, i.id_image, product_shop.show_price, cl.link_rewrite category, p.ean13, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity FROM '._DB_PREFIX_.'order_detail od LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) '.Shop::addSqlAssociation('product', 'p'). (Combination::isFeatureActive() ? 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`) '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' '.Product::sqlStock('p', 'product_attribute_shop', false, $this->context->shop) : Product::sqlStock('p', 'product', false, $this->context->shop)).' LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = od.product_id'.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default' .Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = od.product_id) '.(Group::isFeatureActive() ? $sql_groups_join : '').' WHERE od.id_order IN ('.$list.') AND pl.id_lang = '.(int)$this->context->language->id.' AND cl.id_lang = '.(int)$this->context->language->id.' AND od.product_id NOT IN ('.$list_product_ids.') AND i.cover = 1 AND stock.quantity > 1 AND product_shop.active = 1 '.(Group::isFeatureActive() ? $sql_groups_where : '').' ORDER BY RAND() LIMIT '.(int)Configuration::get('CROSSSELLING_NBR')); $tax_calc = Product::getTaxCalculationMethod(); foreach ($order_products as &$order_product) { $order_product['id_product'] = (int)$order_product['product_id']; $order_product['image'] = $this->context->link->getImageLink($order_product['link_rewrite'], (int)$order_product['product_id'].'-'.(int)$order_product['id_image'], ImageType::getFormatedName('home')); $order_product['link'] = $this->context->link->getProductLink((int)$order_product['product_id'], $order_product['link_rewrite'], $order_product['category'], $order_product['ean13']); if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') && ($tax_calc == 0 || $tax_calc == 2)) { $order_product['displayed_price'] = Product::getPriceStatic((int)$order_product['product_id'], true, null); } elseif (Configuration::get('CROSSSELLING_DISPLAY_PRICE') && $tax_calc == 1) { $order_product['displayed_price'] = Product::getPriceStatic((int)$order_product['product_id'], false, null); } $order_product['allow_oosp'] = Product::isAvailableWhenOutOfStock((int)$order_product['out_of_stock']); if (!isset($final_products_list[$order_product['product_id'].'-'.$order_product['id_image']])) { $final_products_list[$order_product['product_id'].'-'.$order_product['id_image']] = $order_product; } } } return $final_products_list; } ¿Alguien sabe como hacerlo?
-
Hello, I have installed the crossselling oficial module in a 1.6 store, the module works fine and shows crosselled product in the product page, that is perfect, but I need some mods because the catalogue is a little big and the crossselling selection is very random. I need: - The slide products ordered by number of times that shared order with the product of the page - Not show out of stock items - Show only cross-selled items for the last 12 months ( that is not important) I think the the mod should be done in the crossselling.php file, but after a few tests... I need some help, my PHP skills are so limited. Here you are the code I think I need to modify. For example "AND stock.quantity > 1" works to hide out of stock items, but the rest of conditions are a bit tricky to me if (count($orders) > 0) { $list = ''; foreach ($orders as $order) { $list .= (int)$order['id_order'].','; } $list = rtrim($list, ','); $list_product_ids = join(',', $products_id); if (Group::isFeatureActive()) { $sql_groups_join = ' LEFT JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_category` = product_shop.id_category_default AND cp.id_product = product_shop.id_product) LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cp.`id_category` = cg.`id_category`)'; $groups = FrontController::getCurrentCustomerGroups(); $sql_groups_where = 'AND cg.`id_group` '.(count($groups) ? 'IN ('.implode(',', $groups).')' : '='.(int)Group::getCurrent()->id); } $order_products = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT DISTINCT od.product_id, pl.name, pl.description_short, pl.link_rewrite, p.reference, i.id_image, product_shop.show_price, cl.link_rewrite category, p.ean13, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity FROM '._DB_PREFIX_.'order_detail od LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id) '.Shop::addSqlAssociation('product', 'p'). (Combination::isFeatureActive() ? 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product`) '.Shop::addSqlAssociation('product_attribute', 'pa', false, 'product_attribute_shop.`default_on` = 1').' '.Product::sqlStock('p', 'product_attribute_shop', false, $this->context->shop) : Product::sqlStock('p', 'product', false, $this->context->shop)).' LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = od.product_id'.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default' .Shop::addSqlRestrictionOnLang('cl').') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = od.product_id) '.(Group::isFeatureActive() ? $sql_groups_join : '').' WHERE od.id_order IN ('.$list.') AND pl.id_lang = '.(int)$this->context->language->id.' AND cl.id_lang = '.(int)$this->context->language->id.' AND od.product_id NOT IN ('.$list_product_ids.') AND i.cover = 1 AND product_shop.active = 1 '.(Group::isFeatureActive() ? $sql_groups_where : '').' ORDER BY RAND() LIMIT '.(int)Configuration::get('CROSSSELLING_NBR')); $tax_calc = Product::getTaxCalculationMethod(); foreach ($order_products as &$order_product) { $order_product['id_product'] = (int)$order_product['product_id']; $order_product['image'] = $this->context->link->getImageLink($order_product['link_rewrite'], (int)$order_product['product_id'].'-'.(int)$order_product['id_image'], ImageType::getFormatedName('home')); $order_product['link'] = $this->context->link->getProductLink((int)$order_product['product_id'], $order_product['link_rewrite'], $order_product['category'], $order_product['ean13']); if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') && ($tax_calc == 0 || $tax_calc == 2)) { $order_product['displayed_price'] = Product::getPriceStatic((int)$order_product['product_id'], true, null); } elseif (Configuration::get('CROSSSELLING_DISPLAY_PRICE') && $tax_calc == 1) { $order_product['displayed_price'] = Product::getPriceStatic((int)$order_product['product_id'], false, null); } $order_product['allow_oosp'] = Product::isAvailableWhenOutOfStock((int)$order_product['out_of_stock']); if (!isset($final_products_list[$order_product['product_id'].'-'.$order_product['id_image']])) { $final_products_list[$order_product['product_id'].'-'.$order_product['id_image']] = $order_product; } } } Thanks for your help
-
Buenas, ¿Conseguiste encontrar la traducción? No doy con ella y tengo el mismo tema que tu
-
How to Show Product Attribute Option in Product List
juanmlg replied to jahyax's topic in Core developers
Hi Divyesh, Thanks to your post I discovered that the problem I have is due the blocklayered module OMG! Thanks god . I have the productcomments module modified to show the product rating in the product-list.tpl but when I am using the blocklayered module the ratings only appears on the first page... I have been reading you reply and I understand that I need to add a code at the blocklayered.php inside the ajaxCall() to load the rating on every ajax action but I have tried some code based in your reply without luck. Maybe you can help me: My working function in Productscomment.php is: Could you say me what I need in the blocklayered.php to load the rating? Thanks so much! -
Hello, this month I have get 2 times these error, the first time after contact with the hosting the said that they have changed some config on the server to solve it, but a week later here we are again. I havent done any changes on my files or config. What would be the cause? I receive error 500 and then after turn on the debug mode I see the following info: [PrestaShopDatabaseException] Unknown storage engine 'InnoDB' SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main FROM ps_shop_url su LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop) WHERE (su.domain = 'mitienda.com' OR su.domain_ssl = 'mitienda.com') AND s.active = 1 AND s.deleted = 0 ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) { 787. $dbg = debug_backtrace(); 788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97); 789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 790. if ($sql) { 791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>'); 792. } 793. 794. throw new PrestaShopDatabaseException($this->getMsgError()); 795. } 796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] 420. $this->result = $this->_query($sql); 421. } 422. } 423. 424. if (_PS_DEBUG_SQL_) { 425. $this->displayError($sql); 426. } 427. 428. return $this->result; 429. } 430. DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments] 638. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries'); 639. } 640. return $this->execute($sql, $use_cache); 641. } 642. 643. $this->result = $this->query($sql); 644. 645. if (!$this->result) { 646. $result = false; 647. } else { 648. if (!$array) { DbCore->executeS - [line 334 - classes/shop/Shop.php] - [1 Arguments] 329. WHERE (su.domain = \''.pSQL($host).'\' OR su.domain_ssl = \''.pSQL($host).'\') 330. AND s.active = 1 331. AND s.deleted = 0 332. ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC'; 333. 334. $result = Db::getInstance()->executeS($sql); 335. 336. $through = false; 337. foreach ($result as $row) { 338. // An URL matching current shop was found 339. if (preg_match('#^'.preg_quote($row['uri'], '#').'#i', $request_uri)) { ShopCore::initialize - [line 114 - config/config.inc.php] 109. 110. $context = Context::getContext(); 111. 112. /* Initialize the current Shop */ 113. try { 114. $context->shop = Shop::initialize(); 115. $context->theme = new Theme((int)$context->shop->id_theme); 116. if ((Tools::isEmpty($theme_name = $context->shop->getTheme()) || !Validate::isLoadedObject($context->theme)) && !defined('_PS_ADMIN_DIR_')) { 117. throw new PrestaShopException(Tools::displayError('Current theme unselected. Please check your theme configuration.')); 118. } 119. } catch (PrestaShopException $e) { require - [line 27 - index.php] - [1 Arguments] Argument [0] /home/server/public_html/mitienda/tienda/config/config.inc.php Would be amazing to know if there is a hosting problem and if will be a good idea to move my shop to other hosting. Thanks so much Regards
-
Thanks for your reply! That sound so good, my sql skills are limited so would be amazing if someone can give me the exact sql sentence. Regards!
-
Hello, I have a question. We have been using our store without producs references, now we have update all the products with a reference, but we have noticed that the old orders dont have the reference (when we download the delivery slip the reference loks --- ) so seems that $order_detail.product_reference is empty. How we can update the $order_detail.product_reference with all the references for all old orders? Regards
-
Hello, I have a question. We have been using our store without producs references, now we have update all the products with a reference, but we have noticed that the old orders dont have the reference (when we download the delivery slip the reference loks --- ) so seems that $order_detail.product_reference is empty. How we can update the $order_detail.product_reference with all the references for all old orders? Regards
-
Hello, I need to see the customer's age in the back office order page, so I edited the view.tpl as: But now I see the birthday date (obv) but I don't know any variable for the age number. Can you please help me to get the age instead of birthday date? Maybe I need to use some maths? Thanks!
-
He llegado un poco más lejos, he conseguido la redirección de la home http con el siguiente código: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(www\.)?urltienda1\.com$ [NC] RewriteRule ^$ https://www.urltienda1.com/ [R=301,L] El problema es que ahora en las páginas que no son https no me carga bien el carrito y me da el siguiente error: Seguiré investigando.
-
He estado haciendo pruebas y he detectado que la tienda redirecciona bien en las siguientes páginas (Es decir, si accedo a estas páginas sin https automáticamente se redireccionan a https) Contacto Carrito Formulario de Registro y Login En cambio para la Homepage no ocurre lo mismo, no realiza la redirección, por tanto he probado a añadir al htaccess el siguiente código: RewriteCond %{HTTP_HOST} ^www.urltienda1.com$ RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] Esto soluciona el problema del homepage pero tras añadir el código ciertas páginas no cargan, por ejemplo las categorías se quedan en un loop de redirecciones. La única forma de evitar esto es desactivar las url canónicas en el back office pero no me parece buena opción. Me gustaría encontrar una forma de redireccionar la url de la homepage de http a https sin que afecte a todo el host, simplemente para esa página, ya que el resto lo realiza prestashop correctamente. ¿Alguna idea?
-
Estamos tratando de hacer funcionar una instalación de Prestashop 1.5.3 con un certificado SSL.. La instalación está funcionando con multitienda, con dos dominios independientes, llamémosle: www.urltienda1.com urltienda2.es Tenemos el certificado para la tienda 1, ahora mismo el certificado está funcionando, si accedo a https://www.tienda1.com el certificado funciona correctamente, para la homepage, formularios y pagos, y ya hemos resuelto todas las advertencias de los navegadores. El problema es al acceder el dominio urltienda1.com o www.urltienda1.com redirecciona a http://www.urltienda1.com y queremos que redireccione a https://www.urltienda1.com , suponemos que es un problema de htaccess pero ya hemos probado todo tipo de configuraciones y no hay manera, cuando conseguimos que rediríja al https las páginas que no usan https no cargan. Dejo el htaccess que genera prestashop por defecto parra la multitienda, a ver si alguien puede darnos alguna idea, queremos solucionar esto lo antes posible para poder dejar funcionando el https y evitar contenido duplicado y redirecciones erróneas. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www.urltienda1.com$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} ^urltienda2.es$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] Muchas gracias!
-
Hello, I am using prestashop 1.5.3 (I know its a bit old, I hope to update it soon), I have installed a SSL certificate to run in homepage and in forms pages (I am running multistore and I only want to use SSL in one store "mystore1" ) So the certificate is working well, I can see the locks if I browse to https://www.mystore1.com and all load ok, but the problem is that there is no redirection to https when I browse to www.mystore1.com or mystore1.com. I have mod_rewrite ON and have regenerate the htaccess a few times. This is my htaccess : <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www.mystore1.com$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} ^mystore2.es$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] Please, can you help me to redirect www.mystore1.com and mystore1.com to https://www.mystore1.com Thanks so much!!
-
Buenas, una duda: Mi hosting me da la oportunidad de actualizar de Easyapache3 a Multiphp ¿Puede esto causarme algún problema en mi instalación de prestashop 1.5.3.1? En el caso de actualizar me pregunta a que versión de php, supongo que esto si que sería interesante mantener la misma ¿No? Un saludo y gracias
-
La verdad que es una copia literal de lo que nos esta pasando, es totalmente vergonzoso. ¿Hay algún modulo aunque sea de pago que se sincronice con Seur.net de manera eficiente? Creo que como minimo deberíamos dejar todos nuestra opinión en la ficha del módulo: https://addons.prestashop.com/es/transportistas/16647-seur.html
-
My hosting is a VPS at Hosteurope, I have contacted them to ask to allow more memory limit, seems that php.ini config is not working fine. I need to use pdf invoices everyday, so I can't disable it
-
After making a payment with Paypal module 3.10.2 , I get see this error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 130968 bytes) in ../tools/tcpdf/tcpdf.php on line 6719 My prestashop config is: Information about your server : # 1 SMP Linux Wed July 22 2015 17:23:23 MSK x86_64 Server version software : Apache PHP Version : 5.4.36 Memory Limit : 512M Maximum time: 300 Information database MySQL version : 5.5.42 - cll Motor MySQL : InnoDB Tables Prefix : ps_ Shop information PrestaShop Version : 1.5.3.1 Please help me, thanks.
-
Error When Sorting Back Office Products By Price.
juanmlg replied to juanmlg's topic in Core developers
Any ideas? -
Error When Sorting Back Office Products By Price.
juanmlg replied to juanmlg's topic in Core developers
Please -
When I try to sort my products list by price in the back office, I see a Blank products list, so if I turn ON errors , and I see this error, I am using PrestaShop 1.5.3.1
-
Estimate delivery date in product page code (help)
juanmlg replied to juanmlg's topic in Core developers
Thanks so much ! its perfect! Do you know if there is any smarty variable for the exact time? thanks