Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/reaction-i18n/private/data/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"notFoundTitle": "Oops!",
"notFoundError": "Page not found.",
"productNotFound": "This product was not found.",
"loadMoreProducts": "Load more products"
"loadMoreProducts": "Load more products",
"noProductsFound": "No Products found"
},
"shopSettings": {
"general": "General",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
<div class="container-main">
<div class="product-grid" data-event-category="grid" data-event-action="generic-click" data-event-label="product grid click">
<ul class="product-grid-list list-unstyled" id="product-grid-list">
{{#each products}}
{{> productGridItems}}
{{/each}}
{{#if products}}
{{#each products}}
{{> productGridItems}}
{{/each}}
{{else}}
<div class="row">
<div class="text-center">
<h3>
<span data-i18n="app.noProductsFound">No Products Found</span>
</h3>
</div>
</div>
{{/if}}
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Template.productGrid.onCreated(function () {
if (tag) {
tags = {tags: [tag._id]};
}
// if we get an invalid slug, don't return all products
if (!tag && slug) {
return;
}
const queryParams = Object.assign({}, tags, ReactionRouter.current().queryParams);
Meteor.subscribe("Products", Session.get("productScrollLimit"), queryParams);
});
Expand Down