From 12ecf74873260de66efda3d31b58dc5f39da7df6 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 19 Oct 2019 22:39:23 +0100 Subject: [PATCH] 1.1.3 release, fixes and improvement --- .styleci.yml | 10 ++++++++++ Block/Widget/Special.php | 6 +++--- composer.json | 2 +- etc/module.xml | 2 +- .../widget/special/column/special_images_list.phtml | 2 +- .../product/widget/special/content/special_grid.phtml | 2 +- .../product/widget/special/content/special_list.phtml | 2 +- 7 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 0000000..44929a1 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,10 @@ +preset: psr2 +risky: false +finder: + exclude: + - modules + - node_modules + - storage + - vendor + name: "*.php" + not-name: "*.blade.php" \ No newline at end of file diff --git a/Block/Widget/Special.php b/Block/Widget/Special.php index 83f30aa..c81b5ba 100644 --- a/Block/Widget/Special.php +++ b/Block/Widget/Special.php @@ -68,19 +68,19 @@ public function __construct( */ protected function _getProductCollection() { - return $this->_getSpeciaProductsCollection(); + return $this->_getSpecialProductsCollection(); } /** * Prepare collection for recent product list * @return \Magento\Catalog\Model\ResourceModel\Product\Collection|Object|\Magento\Framework\Data\Collection */ - protected function _getSpeciaProductsCollection() + protected function _getSpecialProductsCollection() { /** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */ $collection = $this->_productCollectionFactory->create(); $collection->setVisibility($this->_catalogProductVisibility->getVisibleInCatalogIds()); - + $collection->getSelect()->orderRand(); $date = new \Zend_Date(); $collection = $this->_addProductAttributesAndPrices($collection) diff --git a/composer.json b/composer.json index 58c080e..93b7ef8 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Special offers landing page with layered navigation", "type": "magento2-module", "license": "proprietary", - "version": "1.1.2", + "version": "1.1.3", "authors": [ { "name": "Dominic Xigen", diff --git a/etc/module.xml b/etc/module.xml index a9aa15b..e519bba 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,5 +1,5 @@ - + diff --git a/view/frontend/templates/product/widget/special/column/special_images_list.phtml b/view/frontend/templates/product/widget/special/column/special_images_list.phtml index 754d7b6..d0b63fe 100755 --- a/view/frontend/templates/product/widget/special/column/special_images_list.phtml +++ b/view/frontend/templates/product/widget/special/column/special_images_list.phtml @@ -20,7 +20,7 @@ - getImage($_product, 'special_products_images_only_widget')->toHtml() ?> + getImage($_product, 'new_products_images_only_widget')->toHtml() ?> diff --git a/view/frontend/templates/product/widget/special/content/special_grid.phtml b/view/frontend/templates/product/widget/special/content/special_grid.phtml index 662093d..2f0d22a 100755 --- a/view/frontend/templates/product/widget/special/content/special_grid.phtml +++ b/view/frontend/templates/product/widget/special/content/special_grid.phtml @@ -18,7 +18,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> $mode = 'grid'; - $image = 'special_products_content_widget_grid'; + $image = 'new_products_content_widget_grid'; $title = __('Special Offers'); $items = $block->getProductCollection()->getItems(); diff --git a/view/frontend/templates/product/widget/special/content/special_list.phtml b/view/frontend/templates/product/widget/special/content/special_list.phtml index 9736690..31380e9 100755 --- a/view/frontend/templates/product/widget/special/content/special_list.phtml +++ b/view/frontend/templates/product/widget/special/content/special_list.phtml @@ -18,7 +18,7 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> $mode = 'list'; - $image = 'special_products_content_widget_list'; + $image = 'new_products_content_widget_list'; $title = __('Special Offers'); $items = $block->getProductCollection()->getItems(); $_helper = $this->helper('Magento\Catalog\Helper\Output');