View.phtml
Paste the below code on your product view template. You can find the file inside the catalog folder.
<script type="text/javascript">
Cart.phtml
Paste the below code on your cart template. You can find the file inside the checkout folder.
Success.phml
Paste the below code on your success template. You can find the file inside checkout folder.
I did it the same way in my Magento installation and it works fine
|
If you have multi-select attribute of product like below If you want filter value for this option Use below syntax to get product data: ->addAttributeToFilter('store_model', array('finset' => $params['store_model'])) finset key is used for multiselect attribute filter. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $products = $objectManager->get('Magento\Catalog\Model\Product') ->getCollection() ->addAttributeToSelect('*') ->addAttributeToSelect('store_brand') ->addAttributeToSelect('store_model') ->addAttributeToSelect('store_year') ->addAttributeToFilter('store_brand', array('finset' => $params['store_brand'])) ->addAttributeToFilter('store_model', array('finset' => $params['store_model'])) ->addAttributeToFilter('store_year', array('
Comments
Post a Comment