@@ -21,27 +21,25 @@ $heading = $block->getHeading();
21
21
$ description = $ block ->isShowDescription ();
22
22
$ itemAmount = $ block ->getItemAmount ();
23
23
if (empty ($ categories )) return ;
24
- $ selector = 'alo-content- ' . uniqid ();
24
+ $ selector = 'alo-content- ' . uniqid ();
25
25
?>
26
26
<?php $ visible = (int ) $ this ->getData ('visible ' ); ?>
27
- <style type="text/css"><?php echo $ this ->getData ('slide ' ) ? '. ' . $ selector . ' .item{float:left; width: ' . 100 /$ visible . '%} . ' . $ selector . ' .item:nth-child(n+ ' . ++$ visible . '){display: none} ' : '' ?> </style>
28
- <?php if ($ heading ): ?>
27
+ <style type="text/css">
28
+ <?php echo $ this ->getData ('slide ' ) ? '. ' . $ selector . ' .item{float:left; width: ' . 100 / $ visible . '%} . ' . $ selector . ' .item:nth-child(n+ ' . ++$ visible . '){display: none} ' : '' ?>
29
+ </style>
30
+ <?php if ($ heading ) : ?>
29
31
<h3 class="title"><?php echo $ heading ?> </h3>
30
32
<p class="text"><span><?= __ ($ this ->getData ('subtitle ' )); ?> </span></p>
31
33
<?php endif ; ?>
32
34
<div class="magepow-categories <?php echo $ selector ?> " data-mage-init='{"gridSlider": {}}'>
33
- <ul class="grid-slider"
34
- <?php foreach ($ this ->getFrontendCfg () as $ opt ) :?>
35
- data-<?php echo $ opt ?> ='<?php echo $ this ->getData ($ opt ) ?> '
36
- <?php endforeach ;?>
37
- >
38
- <?php foreach ($ categories as $ cat ): ?>
35
+ <ul class="grid-slider" <?php foreach ($ this ->getFrontendCfg () as $ opt ) : ?> data-<?php echo $ opt ?> ='<?php echo $ this ->getData ($ opt ) ?> ' <?php endforeach ; ?> <?php foreach ($ this ->getResponsiveBreakpoints () as $ opt ) : ?> data-<?php echo $ opt ?> ='<?php echo $ this ->getData ($ opt ) ?> ' <?php endforeach ; ?> >
36
+ <?php foreach ($ categories as $ cat ) : ?>
39
37
<?php $ image = $ this ->getImageInfo ($ cat ); ?>
40
38
<li class="category-item item">
41
39
<div class="category-item-info">
42
40
<div class="category-image-container">
43
41
<a class="category-url" href="<?php echo $ cat ->getUrl () ?> ">
44
- <img loading="lazy" src="<?php echo $ this ->getImage ($ cat ) ?> " width="<?php echo $ image ->getOriginalWidth () ?> " height="<?php echo $ image ->getOriginalHeight () ?> " alt="<?php echo $ cat ->getName () ?> "/>
42
+ <img loading="lazy" src="<?php echo $ this ->getImage ($ cat ) ?> " width="<?php echo $ image ->getOriginalWidth () ?> " height="<?php echo $ image ->getOriginalHeight () ?> " alt="<?php echo $ cat ->getName () ?> " />
45
43
</a>
46
44
</div>
47
45
<div class="category-item-details">
@@ -50,27 +48,27 @@ $selector = 'alo-content-'.uniqid();
50
48
<span class="category-name"><?php echo $ cat ->getName () ?> </span>
51
49
</a>
52
50
</h3>
53
-
54
- <?php if ($ description ): ?>
51
+
52
+ <?php if ($ description ) : ?>
55
53
<div class="category-description">
56
54
<?php echo $ this ->getDescription ($ cat ) ?>
57
55
</div>
58
56
<?php endif ; ?>
59
- <?php if ($ itemAmount ): ?>
57
+ <?php if ($ itemAmount ) : ?>
60
58
<div class="category-item-amount">
61
- <?php echo "( " . $ cat ->getProductCollection ()->count ();
62
- if ($ cat ->getProductCollection ()->count ()> 0 ) echo " items) " ;
63
- else echo " item) " ;
64
- ?>
59
+ <?php echo "( " . $ cat ->getProductCollection ()->count ();
60
+ if ($ cat ->getProductCollection ()->count () > 0 ) echo " items) " ;
61
+ else echo " item) " ;
62
+ ?>
65
63
</div>
66
64
<?php endif ; ?>
67
65
<div class="btn-link">
68
66
<a class="magepow-categories-category" href="<?php echo $ cat ->getUrl () ?> "><?= $ block ->escapeHtml (__ ('Show now ' )) ?> </a>
69
67
</div>
70
-
68
+
71
69
</div>
72
70
</div>
73
71
</li>
74
72
<?php endforeach ; ?>
75
73
</ul>
76
- </div>
74
+ </div>
0 commit comments