New answers tagged

0

Update a code to <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="customer_register_success"> <observer name="customer_new_data_add" instance="SimpleMagento\Custom\Observer\Another" /> ...


3

namespace Your\Module\Plugin; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Registry; use Magento\Framework\UrlInterface; class Redirect { protected $coreRegistry; protected $url; protected $resultFactory; public function __construct(Registry $registry, UrlInterface $url, ResultFactory $resultFactory) { ...


4

Check your Baseurl and Baseurl secure   Change From :- localhost To :- 127.0.0.1 Then Run This Command :- sudo php bin/magento cache:flush sudo php bin/magento cache:clean


6

First change from http://localhost/sitename to http://127.0.0.1/sitename/ second, after doing this remove var/cache folder.


2

I have installed this extension and followed their instruction and it solved my issue: https://github.com/olegkoval/magento2-regenerate_url_rewrites


0

I would start looking for a single solution only with magento 2, using the magento 2 extensions for blog and questions. unless you have some crazy idea to maintain and design all this separately. this will speedup development and you will have only one framework to follow updates. make it simple. users dont care about your backend, and developer will ...


0

i am facing issue when i add item to cart its redirect to cart page, i have change the redirect to NO from admin but now its direct open checkout page i need it like this when i click the add to cart button it should added to mincart but not leave the product page, after adding when i click the cart from there i can use open cart button to open the cart ...


0

Go to Stores -> Configuration and then General -> Web Make sure Add Store Code to Urls under Url options is set to "Yes" Flush all cache and reindex the store


0

I wrote something that's free and open source which does exactly what you need and doesn't require items to already be in the cart. You can find it here: https://github.com/crankycyclops/DiscountCodeUrl It's still pretty new and needs more testing (if you want to help me out, I'd really appreciate it!), but it's working well for me so far.


0

I figured out a solution that works for me. In the beforeDispatch() method of my FrontControllerInterface plugin, I have the following block of code: $requestPath = $this->request->getPathInfo(); // If a coupon code was included in the URL, fix the URL // after extracting it so that we can continue to route normally if (preg_match("#/discount/([^/]+?)...


0

For this your requirement, you need to use Custom routers instead of plugin on FrontControllerInterfaceetc. Custom router has the ability to handle the custom URL as per as business logic. Custom router internally hit the Magento Standard router Url www.example.com/<front-name>/<controller-name>/<action-name> .At Magento ,if you want to ...


0

I figured it, we need to provide store code in url to get right response from swagger. For Example in my case I provided it as: http://127.0.0.1/swagger?store=default This returns the output same as we get by Postman/Insomnia Reference: https://devdocs.magento.com/guides/v2.3/rest/generate-local.html#generate-a-full-rest-reference-locally Please upvote ...


0

Use below code because you are using url variable out of the scope of the define and one more thing if you have created custom payment method then you have to use uiComponent to extended the template you can check in this path. vendor/magento/module-offline-payments/view/frontend/web/js/view/payment/method-renderer/checkmo-method.js define([ "IOST",...


2

Please use below code in your JS file require([ "IOST", "jquery", "mage/url" ], function( iost, $, url ){ console.log(url) ; }); function transfer(){ console.log(url.build) ; } OR you can use below code for your JS require( ['uiComponent', 'jquery', 'mage/url', 'Iostpay_Iostpaymagento::js/iost.min'], function (uiComponent, $, ...


Top 50 recent answers are included