Categories
CMS Magento Mastering Development

Product grid checkbox input at sales rule form Magento 2 not working

I’m using Magento 2.3.4 and want to add product grid with checkbox as an input for sales rule form (shopping cart price rule), i follow the instruction to add product grid input from here but when I print the $_POST value the input data does not exist. Here’s my code: app/code/Becom/Freegift/Block/Adminhtml/Products/Edit/Tab/Product.php namespace Becom\Freegift\Block\Adminhtml\Products\Edit\Tab; use Magento\Backend\Block\Widget\Grid; […]

Categories
CMS Magento Mastering Development

Product grid checkbox input at sales rule form Magento 2 not working

I’m using Magento 2.3.4 and want to add product grid with checkbox as an input for sales rule form (shopping cart price rule), i follow the instruction to add product grid input from here but when I print the $_POST value the input data does not exist. Here’s my code: app/code/Becom/Freegift/Block/Adminhtml/Products/Edit/Tab/Product.php namespace Becom\Freegift\Block\Adminhtml\Products\Edit\Tab; use Magento\Backend\Block\Widget\Grid; […]

Categories
CMS Development Magento

Magento 2 How to pass collection of custom attribute using multiselect options from block

In list.phtml I am fetching newly created block’s function. like e.g. $blockObj= $block->getLayout()->createBlock(‘Custom\Module\Block\Entree’); $dataget = $blockObj->getProductdata($_productCollection); Now I am using this $dataget variable by replacing of $_productCollection variable. But product count showing wrong. How can I use below $call variable and return it from this block to my phtml, coz having problem as its in […]

Categories
CMS Development Magento

Magento 2 – Display product list filtered by price range

The module I’m working on has a form with three inputs, Low Range, High Range and Sort By Price. For some reason it’s not returning the product collection at all. I’m getting the following error: Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in \app\code\Vendor\CustPriceRange\view\frontend\templates\custpricerange.phtml on line 24 It looks to me like the […]