
FernandoLopez
Members-
Posts
33 -
Joined
-
Last visited
Everything posted by FernandoLopez
-
Customers Bad SQL query
FernandoLopez replied to Jenetic's topic in Configuring and using PrestaShop
Thanks, I am going to check it. I´ll let you know. -
Customers Bad SQL query
FernandoLopez replied to Jenetic's topic in Configuring and using PrestaShop
Hi vekia, there is any way to ckeck it without entering in the control panel of the website?? Any command in prestashop for seeing the columns of the tables?? -
Customers Bad SQL query
FernandoLopez replied to Jenetic's topic in Configuring and using PrestaShop
Hi Vekia, yes I've checked it, I think I have detected the problem but I don´t know how to solve it. My prestashop version es 1.4.7.0. In the file \adminxxx\tabs\admincustomers.php at the begining there is a sentence like this: $this->_select = '(YEAR(CURRENT_DATE)-YEAR(`birthday`)) - (RIGHT(CURRENT_DATE, 5)<RIGHT(`birthday`, 5)) as age, ( SELECT c.date_add FROM '._DB_PREFIX_.'guest g LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest WHERE g.id_customer = a.id_customer ORDER BY c.date_add DESC LIMIT 1 ) as connect'; Really I don´t know anything about this sentence, I only know that if I remove the "_ " from the select, like this: $this->select = '(YEAR(CURRENT_DATE)-YEAR(`birthday`))ssssss then all my customers appear when I click in the tab customers, but I have a notice from ny php that says "in the line admintabs.php 1526 there isn´t index connect" -
Customers Bad SQL query
FernandoLopez replied to Jenetic's topic in Configuring and using PrestaShop
Could anyone solve this problem?? I have the same problem?? -
aqui tienes el contenido del archivo <!-- MODULE Home Featured Products --> <div id="featured_products"> <h4>{l s='Featured products' mod='homefeatured'}</h4> {if isset($products) AND $products} <div class="block_content"> <ul> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product"> <a class="product_image" href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.name|escape:html:'UTF-8'}" /></a> <div> <h5><a class="product_link" href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:40:'...'|escape:'htmlall':'UTF-8'}</a></h5> <span class="price">{if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}</span> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart title' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Add to cart' mod='homefeatured'}</span> {/if} {/if} <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if} </div> <!-- /MODULE Home Featured Products --> y la verdad victor que a la ultima pregunta de bien regeneradas las imágenes, en la pestaña Preferencias-->Imagenes, no me suena de nada
-
-
Back Office Bad SQL query Customers error
FernandoLopez replied to tekneto's topic in Ecommerce x PrestaShop [ARCHIVE BOARD]
Anyone could solve de problem of tekneto?? I have the same problem- 5 replies
-
- Bad SQL query
- Customers
-
(and 1 more)
Tagged with:
-
Hola a todos, como se puede hacer para que el modulo de productos destacados muestre los items aleatoriamente. Pero no que los mismos 12 items vayan rotándose y mostrandose aleatoriamente, sino que haga una busqueda en todos los productos destacados y muestre 12 que hayan resultado de esa busqueda aleatoria.
-
pues el contenido es este: <?php if (!defined('_CAN_LOAD_FILES_')) exit; class TMBestSellers extends Module { private $_html = ''; private $_postErrors = array(); public function __construct() { $this->name = 'tmbestsellers'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'TM'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('TM Top seller block'); $this->description = $this->l('Add a block displaying the shop\'s top sellers.'); } public function install() { if (!parent::install() OR !$this->registerHook('home') OR !$this->registerHook('updateOrderStatus') OR !ProductSale::fillProductSales()) return false; return true; } public function getContent() { $output = '<h2>'.$this->displayName.'</h2>'; if (Tools::isSubmit('submitBestSellers')) { Configuration::updateValue('PS_BLOCK_BESTSELLERS_DISPLAY', (int)(Tools::getValue('always_display'))); $output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>'; } return $output.$this->displayForm(); } public function displayForm() { return ' <form action="'.$_SERVER['REQUEST_URI'].'" method="post"> <fieldset> <legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <label>'.$this->l('Always display block').'</label> <div class="margin-form"> <input type="radio" name="always_display" id="display_on" value="1" '.(Tools::getValue('always_display', Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY')) ? 'checked="checked" ' : '').'/> <label class="t" for="display_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label> <input type="radio" name="always_display" id="display_off" value="0" '.(!Tools::getValue('always_display', Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY')) ? 'checked="checked" ' : '').'/> <label class="t" for="display_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label> <p class="clear">'.$this->l('Show the block even if no product is available.').'</p> </div> <center><input type="submit" name="submitBestSellers" value="'.$this->l('Save').'" class="button" /></center> </fieldset> </form>'; } public function hookHome($params) { if (Configuration::get('PS_CATALOG_MODE')) return ; global $smarty; $currency = new Currency((int)($params['cookie']->id_currency)); //$bestsellers = ProductSale::getBestSales((int)($params['cookie']->id_lang), 0, 5); $bestsellers = ProductSale::getBestSales((int)($params['cookie']->id_lang), 0, 8); if (!$bestsellers AND !Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY')) return; $best_sellers = array(); foreach ($bestsellers AS $bestseller) { $bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency); $best_sellers[] = $bestseller; } $smarty->assign(array( 'best_sellers' => $best_sellers, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'))); return $this->display(__FILE__, 'tmbestsellers.tpl'); } }