Reinstall Apache 2 Sever

when there are error like Uncaught Error: Call to undefined function PhpMyAdmin\\mb_strpos() in /usr/share/phpmyadmin/libraries/classes/Url.php:253\nStack trace:\n#0 /usr/share/phpmyadmin/libraries/classes/Url.php(206): PhpMyAdmin\\Url::getArgSeparator()\n#1 /usr/share/phpmyadmin/libraries/classes/Url.php(169): PhpMyAdmin\\Url::getCommonRaw()\n#2 /usr/share/phpmyadmin/libraries/classes/Core.php(749): PhpMyAdmin\\Url::getCommon()\n#3 /usr/share/phpmyadmin/libraries/classes/Core.php(330): PhpMyAdmin\\Core::linkURL()\n#4 /usr/share/phpmyadmin/libraries/classes/Core.php(353): PhpMyAdmin\\Core::getPHPDocLink()\n#5 /usr/share/phpmyadmin/libraries/classes/Core.php(973): PhpMyAdmin\\Core::warnMissingExtension()\n#6 /usr/share/phpmyadmin/libraries/common.inc.php(106): PhpMyAdmin\\Core::checkExtensions()\n#7 /usr/share/phpmyadmin/sql.php(21): require_once(‘…’)\n#8 {main}\n thrown in /usr/share/phpmyadmin/libraries/classes/Url.php on line 253 Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and… Continue reading Reinstall Apache 2 Sever

Add a product to the cart programmatically

To add a product to cart programmatically the code is used for the purpose is listed Here we used a simple product ID but in dynamic cases, the product ID should be collected ad it should applied

Add a row count to the order sales view items table – Magento 2.4

We want to add a row count in the order sales view items table. There are 2 ways to achieve this: Let’s start by creating a module Vendor_RowCounter, with the required files, and shared files for both solutions: Add registration.php: Add etc/module.xml: Create a block file, Block/Adminhtml/Items/Column/Row.php: Create a template file, view/adminhtml/templates/items/column/row.phtml: By adding a column via sales_order_view.xml Create view/adminhtml/layout/sales_order_view.xml: The drawback… Continue reading Add a row count to the order sales view items table – Magento 2.4

CSP whitelist in Magetno 2

Content Security Policies (CSP) are a powerful tool to mitigate against Cross Site Scripting (XSS) and related attacks, including card skimmers, session hijacking, clickjacking, and more. By default, Content Security Policiy is configured in report-only mode, which allows merchants and developers to configure policies to work according to their custom code. Your browser is not showing… Continue reading CSP whitelist in Magetno 2

Observer when updating products from Checkout

Using this observer we can monitor the update or trigger any conditions on updating the carthere we’re setting the backorders on update Considering all the stocks on the inventory and store