Magento 2 – Extend core framework

I need to add a new attribute for layout containers. e.g.: customAttribute=”data-block=’minicart’” <container name=”minicart-row” htmlTag=”div” htmlClass=”minicart-wrapper” customAttribute=”data-block=’minicart'”> I can solve this by editing the core at vendor/magento/framework. I already solved it by editing these files: vendor/magento/framework/View/Layout.php vendor/magento/framework/View/Layout/Element.php vendor/magento/framework/View/Layout/etc/elements.xsd vendor/magento/framework/View/Layout/Generator/Container.php vendor/magento/framework/View/Layout/Reader/Container.php but editing the core is not clean obviously… So I created a new module app/code/Core/Extend…

Very slow Product collection load

I have a custom product collection that takes about 120 sec to load. How can I fix this? I’m posting the functions related to collection (not the whole module code): Mymodule/Block/Products/Category.php /* ….. */ public function getProductCollection($category) { $collection = $this->_productCollectionFactory->create(); $collection->setVisibility($this->_catalogProductVisibility->getVisibleInCatalogIds()); if($category->getId()){ if ($category->hasChildren()) { $categoryFilter = explode(‘,’,$category->getAllChildren()); } else { $categoryFilter = $category->getId();…

How to make tabulator ajax call in wordpress?

As per tabulator documentation the ajax request can be made using the format like this Ajax documentiation : http://tabulator.info/docs/4.5/data#ajax var table = new Tabulator(“#example-table”, { ajaxURL:aglAjax.ajax_url, ajaxParams:{tabledata:aglAjax.data}, ajaxConfig:{ method: ‘GET’, mode:”cors”, //set request mode to cors credentials: “same-origin”, //send cookies with the request from the matching origin headers: { “Accept”: “application/json”, //tell the server we…