Remove .js file (loaded via require.js) from category list

There’s an extension in my website that loads price-box.js in all website pages. requirejs-config.js var config = { “map”: { “*”: { priceBox: ‘FME_Pricecalculator/js/price-box’ } } }; I’d like to remove that file from all category list pages. I tried doing that by layout xml files, but didn’t work. catalog_category_view.xml <page xmlns:xsi=”” layout=”2columns-left” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <head>…

How to get rule id with respect to customer group id

class CouponCode extends \Magento\Framework\View\Element\Template { protected $_customerSession; protected $_customerGroupCollection; public function __construct( \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Group $customerGroupCollection, \Magento\Framework\View\Element\Template\Context $context) { $this->_customerSession = $customerSession; $this->_customerGroupCollection = $customerGroupCollection; parent::__construct($context); } public function getCouponCodes() { $currentGroupId = $this->_customerSession->getCustomer()->getGroupId(); //Get customer group Id , you have already this so directly get name $collection = $this->_customerGroupCollection->load($currentGroupId); return $collection->getCustomerGroupCode();//Get group name }