-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6674 from julienbourdeau/feat/improve-ajax-for-li…
…sting Fix ajax refresh for listing pages
- Loading branch information
Showing
14 changed files
with
165 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
themes/classic/templates/catalog/_partials/active_filters.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
themes/classic/templates/catalog/_partials/products-bottom.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{* | ||
* Classic theme doesn't use this subtemplate, feel free to do whatever you need here. | ||
* This template is generated at each ajax calls. | ||
* See ProductListingFrontController::getAjaxProductSearchVariables() | ||
*} | ||
<div id="js-product-list-bottom"></div> |
32 changes: 32 additions & 0 deletions
32
themes/classic/templates/catalog/_partials/products-top.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<div id="js-product-list-top" class="row products-selection"> | ||
<div class="col-md-6 hidden-sm-down total-products"> | ||
{if $listing.products|count > 1} | ||
<p>{l s='There are %product_count% products.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.products|count]}</p> | ||
{else} | ||
<p>{l s='There is %product_count% product.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.products|count]}</p> | ||
{/if} | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="row"> | ||
|
||
{block name='sort_by'} | ||
{include file='catalog/_partials/sort-orders.tpl' sort_orders=$listing.sort_orders} | ||
{/block} | ||
|
||
{if !empty($listing.rendered_facets)} | ||
<div class="col-sm-3 col-xs-4 hidden-md-up filter-button"> | ||
<button id="search_filter_toggler" class="btn btn-secondary"> | ||
{l s='Filter' d='Shop.Theme.Actions'} | ||
</button> | ||
</div> | ||
{/if} | ||
</div> | ||
</div> | ||
<div class="col-sm-12 hidden-md-up text-xs-center showing"> | ||
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=[ | ||
'%from%' => $listing.pagination.items_shown_from , | ||
'%to%' => $listing.pagination.items_shown_to, | ||
'%total%' => $listing.pagination.total_items | ||
]} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,20 @@ | ||
<section id="products"> | ||
<div id="js-product-list"> | ||
<div class="products row"> | ||
{foreach from=$listing.products item="product"} | ||
{block name='product_miniature'} | ||
{include file='catalog/_partials/miniatures/product.tpl' product=$product} | ||
{/block} | ||
{/foreach} | ||
</div> | ||
|
||
{if $listing.products|count} | ||
<div class="row products-selection"> | ||
<div class="col-md-6 hidden-sm-down total-products"> | ||
{if $listing.products|count > 1} | ||
<p>{l s='There are %product_count% products.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.products|count]}</p> | ||
{else} | ||
<p>{l s='There is %product_count% product.' d='Shop.Theme.Catalog' sprintf=['%product_count%' => $listing.products|count]}</p> | ||
{/if} | ||
</div> | ||
<div class="col-md-6"> | ||
<div class="row"> | ||
{block name='sort_by'} | ||
{include file='catalog/_partials/sort-orders.tpl' sort_orders=$listing.sort_orders} | ||
{/block} | ||
{if !empty($listing.rendered_facets)} | ||
<div class="col-sm-3 col-xs-4 hidden-md-up filter-button"> | ||
<button id="search_filter_toggler" class="btn btn-secondary"> | ||
{l s='Filter' d='Shop.Theme.Actions'} | ||
</button> | ||
</div> | ||
{/if} | ||
</div> | ||
</div> | ||
<div class="col-sm-12 hidden-md-up text-xs-center showing"> | ||
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=['%from%' => $listing.pagination.items_shown_from ,'%to%' => $listing.pagination.items_shown_to, '%total%' => $listing.pagination.total_items]} | ||
</div> | ||
</div> | ||
{block name='pagination'} | ||
{include file='_partials/pagination.tpl' pagination=$listing.pagination} | ||
{/block} | ||
|
||
|
||
<div class="hidden-sm-down">{$listing.rendered_active_filters nofilter}</div> | ||
|
||
<div class="products row"> | ||
{foreach from=$listing.products item="product"} | ||
{block name='product_miniature'} | ||
{include file='catalog/_partials/miniatures/product.tpl' product=$product} | ||
{/block} | ||
{/foreach} | ||
</div> | ||
|
||
{block name='pagination'} | ||
{include file='_partials/pagination.tpl' pagination=$listing.pagination} | ||
{/block} | ||
|
||
<div class="hidden-md-up text-xs-right up"> | ||
<a href="#header" class="btn btn-secondary"> | ||
Back to top | ||
<i class="material-icons"></i> | ||
</a> | ||
</div> | ||
{else} | ||
{include file='errors/not-found.tpl'} | ||
{/if} | ||
</section> | ||
<div class="hidden-md-up text-xs-right up"> | ||
<a href="#header" class="btn btn-secondary"> | ||
{l s='Back to top' d='Shop.Actions'} | ||
<i class="material-icons"></i> | ||
</a> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.