Modificar el archivo / Modify this file:
modules .>blocktopmenu > blocktopmenu.php
Tenemos que colorcar una clase a cada etiqueta LI del menú .
1. Necesitamos saber que LI pertenece al segundo nivel .
En la función private function getCategory tenemos la varialble $category->level_depth que indica el nivel de la categoría.
We need a class in the LI label
We need to know with LI belongs to the second level
In the function private function getCategory the variable $category->level_depth shows the category level.
Según las categoráis prestashop:
Acording to the prestashop category:
Inicio (Nivel 1)
Cat(Nivel 2)
Cat(Nivel 3)
Cat(Nivel 2)
Cat(Nivel 2)
Así que vamos a poner una condicion que discrimine los niveles 2. Dentro de la misma función sustituimos:
Introduce a condition to differentiate levels. In the same function replace:
$this->_menu .= '<. li '.$selected.'>';
por / to
if ($category->level_depth == 2){
$this->_menu .= '<.li '.$selected.' class='aqui ira la clase /the style will place here'>';
$this->contstile ++;
}else{
$this->_menu .= '<.li '.$selected.'>';
}
2. Colocar el estilo que queremos. Inicializamos dos variables generales en la clase y colocamos debajo de las que hay:
Place the stile you want. Initialize two general variables and place beneath the actuals.
class Blocktopmenu extends Module
{
private $_menu = '';
private $_html = '';
private $user_groups;
private $topstile= array('unotopmenu','dostopmenu','trestopmenu', 'cuatrotopmenu','cincotopmenu','seistopmenu','sietetopmenu' ,'ochotopmenu','nuevetopmenu','dieztopmenu','oncetopmenu'); <-- array="" br="" con="" estilos="" los="" name="" of="" style.="" the="" with="">-->
private $contstile=0; <-- comment-----="" contador="" counter="">-->
Colocamos en el LI la clase que corresponde / Place in the LI at the class belonging.
if ($category->level_depth == 2){
$this->_menu .= '<.li '.$selected.' class='.$this->topstile[$this->contstile].'>'; <-- br="" el="" estilo="" here="" inserta="" la="" moviendo="" moving="" nbsp="" place="" the="" variable.="" variable=""> $this->contstile ++;
}else{
$this->_menu .= '<.li '.$selected.'>';
}-->
3. Colocar la clase de color que queremos en el css / Place the styles with the colocr in the CSS:
module>blocktopmenu>css>superfish-modified.css
.unotopmenu{ background-color:#C0F;}
.dostopmenu{background-color:#CC3;}
...
lunes, 28 de octubre de 2013
Escalar logotipo en plantilla movil de prestashop 1.5 / Scale logo in the mobile prestashop theme 1.5
Cuando subimos el logotipo a prestashop en la versión movil se reescala sólo horizontal.
Para quitar esta opción y no se deforme.
Uploaded logo on prestashop in the mobile version 1.5 logo scales only with.
To take off this option and loss of shape:
Modificar el archivo Modify file:
themes>defatult>mobile>header.tpl
linea /line: 67

Borrar /delete:
{if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}
Para quitar esta opción y no se deforme.
Uploaded logo on prestashop in the mobile version 1.5 logo scales only with.
To take off this option and loss of shape:
Modificar el archivo Modify file:
themes>defatult>mobile>header.tpl
linea /line: 67
Borrar /delete:
{if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}
Suscribirse a:
Comentarios (Atom)