Skip to content

Commit f2c679d

Browse files
author
Stanislav Idolov
committed
MAGETWO-63271: Add pager to shopping cart page
1 parent d8d405b commit f2c679d

File tree

2 files changed

+9
-9
lines changed
  • app/code/Magento/Checkout

2 files changed

+9
-9
lines changed

app/code/Magento/Checkout/Block/Cart/Grid.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Grid extends \Magento\Checkout\Block\Cart
4040
*
4141
* @var bool
4242
*/
43-
private $isDisplayPager;
43+
private $isPagerDisplayed;
4444

4545
/**
4646
* Grid constructor.
@@ -88,7 +88,7 @@ public function __construct(
8888
*/
8989
protected function _construct()
9090
{
91-
if (!$this->isDisplayPagerOnPage()) {
91+
if (!$this->isPagerDisplayedOnPage()) {
9292
parent::_construct();
9393
}
9494
if ($this->hasData('template')) {
@@ -102,7 +102,7 @@ protected function _construct()
102102
protected function _prepareLayout()
103103
{
104104
parent::_prepareLayout();
105-
if ($this->isDisplayPagerOnPage()) {
105+
if ($this->isPagerDisplayedOnPage()) {
106106
$availableLimit = (int)$this->_scopeConfig->getValue(
107107
self::XPATH_CONFIG_NUMBER_ITEMS_TO_DISPLAY_PAGER,
108108
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
@@ -143,7 +143,7 @@ public function getItemsForGrid()
143143
*/
144144
public function getItems()
145145
{
146-
if (!$this->isDisplayPagerOnPage()) {
146+
if (!$this->isPagerDisplayedOnPage()) {
147147
return parent::getItems();
148148
}
149149
return $this->getItemsForGrid()->getItems();
@@ -155,15 +155,15 @@ public function getItems()
155155
*
156156
* @return bool
157157
*/
158-
private function isDisplayPagerOnPage()
158+
private function isPagerDisplayedOnPage()
159159
{
160-
if (!$this->isDisplayPager) {
160+
if (!$this->isPagerDisplayed) {
161161
$availableLimit = (int)$this->_scopeConfig->getValue(
162162
self::XPATH_CONFIG_NUMBER_ITEMS_TO_DISPLAY_PAGER,
163163
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
164164
);
165-
$this->isDisplayPager = !$this->getCustomItems() && $availableLimit < $this->getItemsCount();
165+
$this->isPagerDisplayed = !$this->getCustomItems() && $availableLimit < $this->getItemsCount();
166166
}
167-
return $this->isDisplayPager;
167+
return $this->isPagerDisplayed;
168168
}
169169
}

app/code/Magento/Checkout/view/frontend/web/js/model/cart/cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ define([
9999
/**
100100
* Set data to customer data.
101101
* Concatenate provided key with method name and call method if it exist or makes set by key.
102-
* @example _setCustomAddress method will be called, if it exist.
102+
* @example _setCustomAddress method will be called, if it exists.
103103
* set('address', customAddressValue)
104104
* @example Will set value by provided key.
105105
* set('rates', ratesToCompare)

0 commit comments

Comments
 (0)