STEP-3 Accessing Magento 2 Controller, Bypassing ScandiPWA frontend
  1. 1.
    Add ScandiPWA_Route717 as a sequence to your [MODULE]/module.xml
app/code/ScandiPWA/Version/etc/module.xml
1
<?xml version="1.0" ?>
2
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
4
<module name="ScandiPWA_Version">
5
<sequence>
6
<module name="ScandiPWA_Route717" />
7
</sequence>
8
</module>
9
</config>
10
Copied!
2. Create di.xml file in [MODULE]/etc folder
app/code/ScandiPWA/Version/etc/di.xml
1
<?xml version="1.0" ?>
2
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
3
<virtualType name="ScandiPWA\Router\Controller\ConfigurableRouter" type="ScandiPWA\Router\Controller\Router">
4
<arguments>
5
<argument name="ignoredURLs" xsi:type="array">
6
<item name="getscandipwaversion" xsi:type="string">^/scandipwa/version.*</item>
7
</argument>
8
</arguments>
9
</virtualType>
10
</config>
11
Copied!
3. Run and set:up and c:f, navigate to http://localhost/scandipwa/version you should see the output.
Last modified 1mo ago
Copy link