I have set up a multi store.
en.xxxx.com and new.xxxx.com
new.xxxx.com is the main store and it is ok
es.xxxx.com the second one and it doesn't work because something doesn't load.
In the folder is I have the index.php changed.
The icons don't load and I can't put anything on the cart.
How can I solve it?
<?php require realpath(__DIR__) . '/../new/app/bootstrap.php'; // path of root magento bootstrap.php $params = $_SERVER; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'es_ES'; // change this with the code you chose in step. 4 $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; // store or website $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); $app = $bootstrap->createApplication('Magento\Framework\App\Http'); $bootstrap->run($app);
its probably a CORS issue
kindly check that by opening the console in the browser.
if the issue is there then check and update the URL for static content for the 2nd website.
the domain should be the same to resolve the CORS issue
or you can also by adding this into .htaccess
Header add Access-Control-Allow-Origin "*"
Hello @Perla Simeone
Did you try after running below commands :
php bin/magento setup:static-content:deploy -f php bin/magento c:f
Hope it helps !
any JS errors are there in the browser console?
can you share a screenshot of that?
login into Admin
Store -> Configuration -> General -> Web
change the store to es &
check Secure Base URL for Static View Files
this should be from the www.es.revocompany.com domain
Also, you need to create a symlink to the static & media folder if you have a different folder setup for es store.
Note: Your website is not running from the pub folder. you should update DocumentRoot to the pub folder.
can you share a screenshot for the folder structure?
for ES store?
are you using the same folder for both websites or different?
if different then, create a symlink for the pub folder into the ES store's folder.