Skip to content

Commit

Permalink
Infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
magiccart committed Dec 15, 2023
1 parent 856ec32 commit ed3e4db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<field id="delay" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Delay (ms)</label>
<comment><![CDATA[Delay value for scroll down. default: 600]]></comment>
<validate>required-entry validate-digits validate-zero-or-greater</validate>
</field>
<field id="content" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Content</label>
Expand Down Expand Up @@ -54,6 +55,7 @@
<field id="load_more" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Load More threshold</label>
<comment><![CDATA[When this page number is reached, a button to load more products will be shown instead of continue loading products automatically with the scroll (this could be useful to help the user to reach the footer). TIP: use a high number to disable this feature.]]></comment>
<validate>required-entry validate-digits</validate>
</field>
<field id="load_more_text" translate="label comment" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Load More button text</label>
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<loading_image/>
<loading_text><![CDATA[<em>Loading - please wait...</em>]]></loading_text>
<done_text><![CDATA[<em>You've reached the end of the item.</em>]]></done_text>
<load_more>3</load_more>
<load_more>-1</load_more>
<load_more_text>Load more</load_more_text>
</general>
</magepow_infinitescroll>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/templates/infinitescroll.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if ($loadingImage) {
html: '<div class="ias-trigger ias-trigger-next"><button class="load-more"><?= $loadMoreText ?></button></div>',
textPrev: "<?= $loadMoreText ?>",
htmlPrev: '<div class="ias-trigger ias-trigger-prev"><button class="load-more"><?= $loadMoreText ?></button></div>',
offset: "<?= $loadMore ?>",
offset: <?php echo ($loadMore > 0) ? $loadMore: 'false' ?>,
}));
window.ias.on('rendered', function (items) {
$('body').trigger('contentUpdated');
Expand Down

0 comments on commit ed3e4db

Please sign in to comment.