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
Tag: Magento
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
How can to restrict SPECIFIC CMS pages from being seen by non-logged-in customers?
Need to block some CMS pages from the non-logged-in customersUsing an observer and Events Getting the page ID or page identifier
Call Phtml file on CMS Page – Magento2
We can create a layout file on the frontend using the block or pages from magetno admin panel here the trick used to create that. all phtml using block code login to magento admin. Open any cms page and write block code in content section. Here we called an external phtml file to a page… Continue reading Call Phtml file on CMS Page – Magento2
Disable a shipping method based on a condition
Here we’re considering the ordertotal of the cart. di.xml file
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
How to set a date field in a ui form to be mandatory?
normal Date field in the form need to modify with required fields with the new required field
State code to update the customer address from API
Here we are mentioning to set the state code from the country code and state id from the Netsuite API. We are getting the state and country through the response/params from the API
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