New answers tagged

0

"There are no commands defined in the "cache" namespace." This makes me think the issue is above your CLI command. Make sure magento command are properly installed do bin/magento list in the first place and see if the command doesn't fail, if cache:clean is available and if your new command is available too.My guess is that one of these ...


0

It's very simple and easy to achive.. In Magento root I created PHP script file as below. If you are in magento 2.4.2 or newer version then change require 'app/bootstrap.php'; to require '../app/bootstrap.php'; because now pub is a root directory in latest magento cron_run_direct_script.php <?php ini_set('memory_limit','2048M'); require 'app/bootstrap....


0

<?php namespace Vendor\Module\Console; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use \Vendor\Module\Helper\Data; class Hicustomer extends Command { public function __construct(Data $helper) { $this->helper = $...


0

You need to run this command : php bin/magento cloudways:hicustomer To call block file you need to do like this : class Hicustomer extends Command { protected $myblockobject; public function __construct(\Vendor\Extension\Block\Mycustomblock $myblockobject) { $this->myblockobject = $myblockobject; parent::__construct(); } ...


1

This occurs when the SSL certificate is not properly configured. Try following these steps: cacert.pem from the official cURL website Put this cacert.pem file in the directory (SSL folder) where you have xampp. search for curl.cainfo in php.ini specify the path to the .pem file in the curl.cainfo section restart localhost server


0

I did as below and working smothly $product = $objectManager->create('\Magento\Catalog\Api\ProductRepositoryInterface')->getById($productid); if($product->getId()) { $brandIds = $connection->fetchCol(" SELECT brand_id FROM ".$table_name." WHERE product_id = ".$productid); if(!empty($brandIds)){ echo $...


Top 50 recent answers are included