Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $_category = $this->getCurrentCategory();
- $_children = $_category->getChildrenCategories();
- foreach( $_children as $child ){
- if( $child->getIsActive() ){
- echo "<p>" . $child->getImageUrl() . "</p>";
- bool(false)
- public function getImageUrl(){
- $url = false;
- $image = $this->getImage();
- if ($image) {
- /* @var $_children MagentoCatalogModelResourceModelCategoryCollection */
- $_children = $this->getCurrentCategory()->getCollection();
- $_children->addAttributeToSelect('image')
- ->addAttributeToFilter('is_active', 1))
- ->addIdFilter($_category->getChildren())
- ->setOrder('position', MagentoFrameworkDBSelect::SQL_ASC);
- foreach( $_children as $child ){
- echo "<p>" . $child->getImage(); . "</p>";
Add Comment
Please, Sign In to add comment