Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coconva2118
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hanumant Pratap Singh
coconva2118
Commits
08d040b0
Commit
08d040b0
authored
Nov 04, 2019
by
Pradyuman Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added default image
parent
c67be731
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
list.phtml
...nd/Sm/shop4u/Magento_Catalog/templates/product/list.phtml
+7
-4
No files found.
app/design/frontend/Sm/shop4u/Magento_Catalog/templates/product/list.phtml
View file @
08d040b0
...
...
@@ -31,19 +31,22 @@ $_config = $this->helper('Sm\Shop4u\Helper\Data');
$subCats
=
$subCategory
->
getChildrenCategories
();
$_helper
=
$this
->
helper
(
'Magento\Catalog\Helper\Output'
);
?>
<?php
if
(
$catId
==
206
)
:
?>
<?php
if
(
(
$catId
==
206
)
||
(
$catId
==
213
)
)
:
?>
<div
class=
"category-product products wrapper grid products-grid"
>
<ol
class=
"products list items product-items row"
>
<?php
foreach
(
$subCats
as
$subcat
)
{
$_category
=
$objectManager
->
create
(
'Magento\Catalog\Model\Category'
)
->
load
(
$subcat
->
getId
());
$subcaturl
=
$subcat
->
getUrl
();
$_imgHtml
=
''
;
$_imgHtml
=
''
;
if
(
$_imgUrl
=
$_category
->
getImageUrl
())
{
$_imgHtml
=
'<img src="'
.
$_imgUrl
.
'" />'
;
$_imgHtml
=
$_helper
->
categoryAttribute
(
$_category
,
$_imgHtml
,
'image'
);
}
?>
}
else
{
$defaultCategoryimg
=
$this
->
getViewFileUrl
(
'Magento_Catalog::images/product/placeholder/thumbnail.jpg'
);
$_imgHtml
=
'<img src="'
.
$defaultCategoryimg
.
'" />'
;
$_imgHtml
=
$_helper
->
categoryAttribute
(
$_category
,
$_imgHtml
,
'image'
);
}
?>
<li
class=
"item product product-item"
>
<div
class=
"product-item-info"
data-container=
"product-grid"
>
<div
class=
"item-inner"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment