Jump to content

lain

Members
  • Posts

    51
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

Recent Profile Visitors

3,557,606 profile views

lain's Achievements

Newbie

Newbie (1/14)

9

Reputation

  1. por si alguien está trabajando con la 1.4.x y el módulo 0.61 y no le aparece el módulo en "pago" o en "módulos>pago", hay que cambiar en el archivo cecatpv.php donde dice $this->tab = 'Payment'; por $this->tab = 'payments_gateways'; es una tontería pero en mi caso que trabajo con diferentes grupos de usuarios, no aparecía el módulo ceca para los usuarios que no perteneciesen al grupo "Predeterminado"
  2. Hi, I found this thread in google trying to hide/exclude some CMS pages from prestashop in-page sitemap (not sitemap.xml) If somebody reach this thread as I did, here is the solution in PS 1.4.5.1 in yourtheme/sitemap.tpl change {foreach from=$categoriescmsTree.cms item=cms name=cmsTree} <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/foreach} to {foreach from=$categoriescmsTree.cms item=cms name=cmsTree} {if $cms.id_cms==1} {else} <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/if} {/foreach} where $cms.id_cms==1 is the CMS page´s ID you want to exclude for example, to exclude CMS 1,2 and 3 it would be {if $cms.id_cms==1 || $cms.id_cms==2 || $cms.id_cms==3}
  3. Hi, I found this thread in google trying to hide/exclude some CMS pages from prestashop in-page sitemap (not sitemap.xml) If somebody reach this thread as I did, here is the solution in PS 1.4.5.1 in yourtheme/sitemap.tpl change {foreach from=$categoriescmsTree.cms item=cms name=cmsTree} <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/foreach} to {foreach from=$categoriescmsTree.cms item=cms name=cmsTree} {if $cms.id_cms==1} {else} <li><a href="{$cms.link|escape:'htmlall':'UTF-8'}" title="{$cms.meta_title|escape:'htmlall':'UTF-8'}">{$cms.meta_title|escape:'htmlall':'UTF-8'}</a></li> {/if} {/foreach} where $cms.id_cms==1 is the CMS page´s ID you want to exclude for example, to exclude CMS 1,2 and 3 it would be {if $cms.id_cms==1 || $cms.id_cms==2 || $cms.id_cms==3}
  4. Hola, al instalarlo en PS 1.4.5.1 y darle a "configurar" tengo estos errores: Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "W:\var\www\goodone/modules/blockadvertmulti/blockadvertmulti_bo.tpl" on line 14 "{include file="./blockadvertmulti_cfg.tpl" }" - Unexpected " }", expected one of: "}" , " "' in W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php:431 Stack trace: #0 W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_templateparser.php(2855): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_templateparser.php(2920): Smarty_Internal_Templateparser->yy_syntax_error(10, ' }') #2 W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->doParse(10, ' }') #3 W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php(82): Smarty_Internal_SmartyTemplateCompiler->doCompile('<img src='{$mod...') #4 W:\var\www\goodone\tools\smarty\sysplugin in W:\var\www\goodone\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 431 El error "blockadvertmulti_bo.tpl" on line 14..." lo soluciono quitando el espacio que hay antes de los cierres de llave } en el TPL, el resto pensaba que era algún tema de mi configuración de smarty pero he restaurado mi "smarty.config.inc.php" al default y sigue igual. Tenía pensado trastear un poco con el módulo para hacer lo que pide txar de que cargue un banner diferente cada vez que se cargue la página mediante javascript y Math.random
  5. Hello, about OLD PRICE AND REDUCED PRICE(WITH STROKE) not showing is related with this IF statement in product.tpl: {if $priceDisplay >= 0 && $priceDisplay <= 2} when you delete the if it shows reduced price correctly but any time. There is shomething from module crashing with it Somebody fixed that?
  6. I did it using: $messages = Message::getMessagesByOrderId($order->id, true); foreach ($messages as $message) { $msg = $message['message']; $decoded = html_entity_decode($msg); } $pdf->Cell($width, 10, ($decoded), 0, 'L'); instead: $messages = Message::getMessagesByOrderId($order->id, true); foreach ($messages as $message) { $msg = $message['message']; } $pdf->Cell($width, 10, ($msg), 0, 'L');
  7. Hola, la solución aquí: http://www.prestashop.com/forums/topic/254564-meter-productos-en-el-carrito-en-multiplos-de-x-prestashop-1451
  8. Hola, esta es la solución que he empleado en 1.4.5.1 dentro de CartController.php en la línea 173~ después de: if (!sizeof($this->errors)) { if ($add AND $qty >= 0) { y antes de: /* Product addition to the cart */ if (!isset(self::$cart->id) OR !self::$cart->id) { añadimos esto: // inicio modificación if ((int)$idProductAttribute) $minimal_quantity = Attribute::getAttributeMinimalQty((int)$idProductAttribute); else $minimal_quantity = $producToAdd->minimal_quantity; if ($qty%$minimal_quantity!= 0) { // $this->errors[] = Tools::displayError('You can only only add this item to your cart with a quantity multiple of ').' '.$minimal_quantity; die('{"hasError" : true, "errors" : ["Este producto únicamente puede ser añadido al carrito en cantidades multiplos de '.$minimal_quantity.'. Por ejemplo: '.($minimal_quantity).', '.($minimal_quantity*2).', '.($minimal_quantity*3).', '.($minimal_quantity*4).'... "]}'); } // fin modificación ahora en "themes/laplantillaqueusemos/js/product.js cambiar: if ($('#quantity_wanted').val() < minimal_quantity) por: // código viejo // if ($('#quantity_wanted').val() < minimal_quantity) if ($('#quantity_wanted').val()%minimal_quantity!=0) Si se quiere el mensaje de "la cantidad múltiplo de..." en un site multi idioma habrá que emplear '.Tools::displayError('Error in English.').' y agregar las correspondientes traducciones
  9. Hello, what I did was to create a variable in frontcontroller.php which contains group id. Then in TPL files add an IF to check if customer belongs certain group and show custom content like percent group discount, stroked prices or anything For example, I only have 1 special group, so to show old price only on this group I use code above and this {convertPrice price=$product.price_without_reduction} in product-list.tpl to show group prices before discount. I could add -10% label too. On the same way, it is possible to add an IF ELSEIF for any groups you want and add custom "-10%", "-15%" labels. Anyway, I guess PS saves group discounts somewhere and you could get it using code.
  10. Thank you vekia, your idea fixed my problem, using shop database and PS_CONFIGURATION table to save variable value temporarily was the solution. Thank you again
  11. Anyway, someone knows how to do that? call a function, modify a variable and use this variable in another function
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More