how to get product collection filtred by products on sale

I’m trying to get collection of products with promotional price. Does someone has an idea how to et it? protected function _getProductCollection() { if (is_null($this->_productCollection)) { $categoryID = $this->getCategoryId(); if($categoryID) { $category = new Mage_Catalog_Model_Category(); $category->load($categoryID); // this is category id $collection = $category->getProductCollection(); } else { $collection = Mage::getResourceModel(‘catalog/product_collection’); } $todayDate = date(‘m/d/y’); $tomorrow…

Magento 2: “Add to Wishlist” not adding configurable products options

I am trying to add wish list button in mini cart,it works well for simple products but not adding the options for configurable products. Override Magento_Checkout mini-cart template: <?php namespace Custom\Module\CustomerData\Preference; use Magento\Framework\App\ObjectManager; use Magento\Catalog\Model\Product\Configuration\Item\ItemResolverInterface; class DefaultItem extends \Magento\Checkout\CustomerData\DefaultItem { protected $imageHelper; protected $msrpHelper; protected $urlBuilder; protected $configurationPool; private $wishlistHelper; public function __construct( \Magento\Catalog\Helper\Image $imageHelper,…

Use of vendor/magento/magento2-base?

After setting up a Magento shop with composer create-project –repository=https://repo.magento.com/ magento/project-community-edition I’ve got a file structure that seems to be identical to the content of magento/magento2-base in the vendor directory. Probably because it is a just copy of those files. Why does this dependency exist? I guess no code in the vendor directory gets executed,…