Jump to content

[solved] Alysum - Mega menu fara poza


Recommended Posts

Buna tuturor,

 

Am o problema, daca ma poate ajuta cineva.

 

As avea nevoie de ultima versiune a meniului MegaMenu pentru Tema Alysum.

Din pacate cel care vine in pachet cu Tema are o eroare la generarea imaginii din partea dreapta.

 

Multumesc anticipat pentru ajutor.

Cu stima,

B.

Edited by drgify (see edit history)
Link to comment
Share on other sites

hi vekia, thanks for the fast reaction.

url-ul temporar este: http://gifyws.ro/tiboo/

 

problema mai precis este:

- daca nu exista produs cu poze in category/subcategory, arata poza "No image available", ce teoretic ar fi OK;

- INSA daca exista cel putin un produs cu poza, in loc sa-l arate randomize, arata doar o poza unica cu semnul intrebarii... :(

 

B.

Link to comment
Share on other sites

if (!empty($is_intersected))

{

$this->_menu .= '<li '.$selected.'>';

$this->_menu .= '<a id="'.$id_category.'" class="cat_ID" href="'.$category_link.'">'.$category->name.'</a>';

 

 

if (count($children))

{

$columns = count($children)/4;

$this->_menu .= '<div class="menuWrapper'.$category->level_depth.'" id="cat_'.$id_category.'"><ul id="subcat_'.$category->level_depth.'">';

$i = 0;

foreach ($children as $child) {

 

$query = 'SELECT `id_product` FROM '._DB_PREFIX_.'product WHERE `id_category_default` = '.$child["id_category"];

 

if (Db::getInstance()->getValue($query) != false) {

 

$prd[$i] = $id_prod = Db::getInstance()->getValue($query);

 

$q = 'SELECT `id_image` FROM '._DB_PREFIX_.'image WHERE `id_product` = '.$id_prod;

 

if (Db::getInstance()->getValue($q) != false) {

$img[$i] = $id_image = "-".Db::getInstance()->getValue($q);

} else {

$img[$i] = $id_image = "";

}

} else {

$prd[$i] = $id_prod = "en-default";

$img[$i] = $id_image = "";

}

 

$this->getCategory((int)$child['id_category'], (int)$id_lang, (int)$child['id_shop']);

$i++;

//$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/c/'.(int)$child['id_category'].'-category.jpg"/></div>';

$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/p/'.$id_prod.$id_image.'-home.jpg"/></div>';

}

 

$revers_prd = array_reverse($prd);

$revers_img = array_reverse($img);

foreach ($revers_prd as $key=>$item) {

if ($item != "en-default") {

$rev_prd = $item;

} else {

if (empty($rev_prd)) $rev_prd = "en-default";

}

}

foreach ($revers_img as $key=>$item) {

if ($item != "") {

$rev_img = $item;

} else {

if (empty($rev_img)) $rev_img = "";

}

}

$this->_menu .= '</ul><div id="c_'.$id_category.'" class="categoryImg"><img src="'.$pth.'/img/p/'.$rev_prd.$rev_img.'-home.jpg"/></div></div>';

}

$this->_menu .= '</li>';

}

Link to comment
Share on other sites

vad ca in codul tau este comentat afisarea imaginei pentru o categorie

//$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/c/'.(int)$child['id_category'].'-category.jpg"/></div>';
$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/p/'.$id_prod.$id_image.'-home.jpg"/></div>';

si in loc este afisat o poza dintr-un produs.

deci incearca sa pui invers

$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/c/'.(int)$child['id_category'].'-category.jpg"/></div>';
//$this->_menu .= '<div id="c_'.(int)$child['id_category'].'" class="categoryImg"><img src="'.$pth.'/img/p/'.$id_prod.$id_image.'-home.jpg"/></div>';

Link to comment
Share on other sites

×
×
  • Create New...