GuciOos Posted April 17, 2014 Share Posted April 17, 2014 Witam. Mam taki problem. Otóż jak klikne sobie w menu w kategorie główną (standardowo "Strona główna" ja sobie zmieniłem w bazie danych na "Obuwie") to pokazuje że niema produktów w tej kategorii... A wszystkie produkty mam przypisane do tej kategorii... Ma ktoś pomysł co może być tego przyczyną? Info: Wersja Prestashop: 1.4.4.1 Informacja o serwerze: Linux #1 SMP Fri Jan 10 22:05:34 CET 2014 x86_64 Wersja oprogramowania serwera: Apache/2.4 Wersja PHP: 5.2.17 Wersja MySQL: 5.1.61-rel13.2-log Strona: www.rpolanski.com Link to comment Share on other sites More sharing options...
vekia Posted April 17, 2014 Share Posted April 17, 2014 strona główna to nie kategoria, strona główna to strona główna z tego co widzę, Twoja kategoria główna nazywa się obuwie: http://rpolanski.com/1-obuwie Link to comment Share on other sites More sharing options...
GuciOos Posted April 17, 2014 Author Share Posted April 17, 2014 Tak tak, napisałem o tym zmieniłęm tylko nazwe w bazie. ale wchodząc na obuwie nie wyświetlają się produkty ;/ a wszystkie sa do niej dodane. Link to comment Share on other sites More sharing options...
selljus.pl Posted April 17, 2014 Share Posted April 17, 2014 Podczas edycji produktu zaznaczona jest główna kategoria oraz podkategoria ?Jeśli zaznaczymy samą podkategorię to nie będzie produkt wyświetlany w głównej. Link to comment Share on other sites More sharing options...
GuciOos Posted April 17, 2014 Author Share Posted April 17, 2014 Jest zaznaczona kategoria główna oraz podkategoria. Widać nawet na screenie że są w kategorii Obuwie 179 produkty. Link to comment Share on other sites More sharing options...
GuciOos Posted April 17, 2014 Author Share Posted April 17, 2014 Testowałem na localhoście(utworzyłem jedną pustą podkategorie) to i zauważyłem, że jak klikne sobie na ta kategorie główną to tak jakby nie łąduje się wogóle cała strona... nie ma filtrów i informacji że brak produktów w tej kategorii... co dobrze widać na screenie poniżej. Link to comment Share on other sites More sharing options...
GuciOos Posted April 17, 2014 Author Share Posted April 17, 2014 (edited) Udało się Dla potomnych: W pliku CategoryController jest taki oto zapis: if ($this->category->id != 1) { $nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$nbProducts); self::$smarty->assign('nb_products', (int)$nbProducts); $cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); } Trzeba tylko wyrzycić tego if'a i będzie śmigać... po prostu robi on to że podczas wczytywania produktów jeśli jesteśmy w kategorii o ID=1 (czyli kategoria główna) to nie pobiera produktów Tak powinien ten kod wyglądać: $nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$nbProducts); self::$smarty->assign('nb_products', (int)$nbProducts); $cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); Pozdrawiam i dzięki wszystkim za pomoc Edited April 17, 2014 by GuciOos (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts