Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatts committed Oct 19, 2019
2 parents e4ecf4e + 12ecf74 commit 77d3c43
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
preset: psr2
risky: false
finder:
exclude:
- modules
- node_modules
- storage
- vendor
name: "*.php"
not-name: "*.blade.php"
6 changes: 3 additions & 3 deletions Block/Widget/Special.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Xigen_Special" setup_version="1.1.2">
<module name="Xigen_Special" setup_version="1.1.3">
</module>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<a class="product-item-photo" href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>"
title="<?= /* @escapeNotVerified */ $block->stripTags($_product->getName(), null, true) ?>">
<?php /* special_products_images_only_widget */ ?>
<?= $block->getImage($_product, 'special_products_images_only_widget')->toHtml() ?>
<?= $block->getImage($_product, 'new_products_images_only_widget')->toHtml() ?>
</a>
</li>
<?php endforeach; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 77d3c43

Please sign in to comment.