I want to show alert using function in phtml file as per below but it seems like the function (myfunction) is not calling. <button onclick="myFunction()">Try it</button> <script type="text/javascript"> require(['jquery'], function($){ function myFunction() { alert("I am an alert box!"); } }) </script>
Magento2
Class MagentoFrameworkMailEmailMessageInterfaceFactory does not exist Class VendorExtensionModelMailTransportBuilderInterceptor generation error: The requested class did not generate properly, because the ‘generated’ directory permission is read-only. If — after running the ‘bin/magento setup:di:compile’ CLI command when the ‘generated’ directory permission is set to write — the requested class did not generate properly, then […]
somehow I cant push local main to GitHUB empty Test Repo via “gh auth login” Git Bash from local directory. Ive tried SSH with Token and HTTPS via Browser same error message. OS Win 11 Home. Firewall Settings maybe. Can you please help / advice what could cause this Issue […]
Environment – Magento (Open Source / Adobe Commerce) 2.4.6 – PHP 8.2; MySQL 8.1 – Same codebase on both instances: Original and Test (no code differences). – Full DB export from Original → import into a clean schema on Test. Problem After importing the DB into Test, all admin scope […]
I need to modify standart Magento search to remove some symbols and some additional logic. My code looks something like this: public function execute() { $query = $this->_queryFactory->get(); $queryText = $query->getQueryText(); $manufacturer = false; $pos = strrpos($queryText, "-"); if ($pos >= 0) { $queryText = str_replace("-", "", $queryText); $query->setQueryText($queryText); } […]
I am upgrading magento 2.4.5 to 2.4.8 I have done in local working fine then i deploy in develoment server its working fine . When i am going to deploy composer.json,composer.lock,magento.env,yaml.magento.app.yaml with all other code and design file getting the below error. Same files working in dev server The command […]
I am using magento 2 in mini cart, I am trying to get the event during which product is being added and removed, a specific item not by cart shown is the item that exists in mini cart, I want that when the user click the “Update” button it is […]
Running an online shop today can feel like standing next to giants. Big retailers have deep pockets, large marketing teams and advanced… Continue reading on Medium »