New answers tagged

0

I keep bumping in this so I read up a bit more and now feel there is a need for better answers Solutions that tell you to do cron_run = 'false" will disable other queues you do want, like bulk attribute update or export file generation. Option 1 disable package php bin/magento module:disable Magento_WebapiAsync php bin/magento module:disable Magento_Amqp ...


1

Whilst the first answer works, not only it is rather messing up the template but more importantly, it is not reusable a lot. In your case, you want to reuse this product spec block in the search. I have come up with a solution more robust but it comes with a cost that you have to do more changes in your system. you have to create another layout file called ...


1

This path is simple product module vendor\magento\module-catalog and you create the custom theme override you theme like :- Vendor_Name\Theme_Name\Magento_Catalog After you override must be run this command :- php bin/magento s:up php bin/magento c:f Hope this help you Thanks ...


0

You want module-catalog and in your custom theme Magento_Catalog


1

Changing the list.phtml template, The below does work for me: <?php $blockSpecs = $block->getChildBlock('product-specs'); if ($blockSpecs) { $blockSpecs->setProduct($_product); echo $blockSpecs->toHtml(); } ?>


0

First of all, you have to implement the Magento Coding Standard, then you can create a Travis config file to set the PHP version that you want to test your module and the Magento version and edition, for example: PHP 7.2 - Magento OpenSource (2.3.2, 2.3.3-p1) - Magento Commerce (2.3.2, 2.3.3-p1) PHP 7.3 - Magento OpenSource (2.3.3-p1, 2.3.4-p2) - Magento ...


0

You will need to create your own module to override some of the core functionality, specifically inside the di.xml file of your new module. Create a new module in app/code/[Namespace]/[Module] Setup your di.xml file inside app/code/[Namespace][Module] Create your referenced objects that overrides the core files. You have two options inside di.xml : ...


0

Magento can be installed using composer or you can also clone the Magento repository. When using composer, a vendor folder is created (this is not specific to Magento in fact). Now, the content of the vendor folder is directly linked to the file composer.json at the root of your Magento install. If you change any core code in the vendor folder by mistake, ...


0

Actually this is the best thing I have found so far: https://www.integer-net.com/make-magento-2-small-again/


0

Just in case someone comes across this old question and wants to do this without coding... We published an extension for Magento 2 that allows to disable/remove, but also sort Customer Account Links by Configuration from Backend: For more details please see Customer Account Links Manager Extension


0

This can be done easily, first make you sure if there are no values then column has null value instead of empty. Then when use filter it will wo


0

There are two ways to do that: You can use composer patches to change file (https://github.com/cweagans/composer-patches) Use around plugin to override specific public method on a class. (https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html)


0

You can override using magento plugin concept or simply override concept using preferences


1

Ok, take a look here: vendor/magento/module-shipping/Model/Rate/Result.php There is function sortRatesByPrice(); This foreach puts all in array for sorting: foreach ($this->_rates as $i => $rate) { $tmp[$i] = $rate->getPrice(); } If you change this $rate->getPrice() to $rate->getMethodTitle() it will sort by method title, ...


1

I think you can simply sort first the array before your foreach using at least asort() asort() - sort associative arrays in ascending order: asort($slotsData) foreach ($slotsData......){}


0

@Lez, the module process above is very involved. It is like using a hammer to kill an ant. If you have access to the theme file, you can also use the language file and redefined "Orders and Returns" to "WHAT EVER YOU WANT". In the app/design/frontend/{Vendor}/{theme}/i18n/ folder find the file en_US.csv if the folder /i18n/ is not there create one and add ...


0

If this is a JS file that will be edited outside of the Magento theme/static content deployment process it might be better to place the JS file somewhere else to stop if getting deleted/overwritten when you do those tasks. I'd almost treat it as a 3rd party script and link to it using the script tag via XML: <page xmlns:xsi="http://www.w3.org/2001/...


1

You can implement the HTTP class and call the method setNoCacheHeaders, as you can see below. use Magento\Framework\App\Response\Http; public function myCustomMethod(){ $this->response->setNoCacheHeaders(); ... } It will implement this module below, which will set no-cache in the header.


0

I just came across a similar problem. The problem here is that the sortOrder in the di.xml is set to 22 which is higher in priority than the sortOrder of 30 for the standard router, see https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html for reference With the way a usual CustomRouter in web tutorials looks like, and maybe even more ...


0

I found the issue. Not sure it’s a fix, but I was finally able to figure out how to install modules via composer. I did it by accident, but inevitably it worked. Thank you for all the help everyone.


2

You need to perfact solution please edit below function on line no 96 follow this- vendor\magento\framework\Image\Adapter\Gd2.php-- private function validateURLScheme(string $filename) : bool { $allowed_schemes = ['ftp', 'ftps', 'http', 'https']; $url = parse_url($filename); if ($url && isset($url['scheme']) && !in_array($...


1

I had the same issue. Found a workaround on GitHub. Installed 100%. https://github.com/magento/magento2/issues/28055


Top 50 recent answers are included