cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Sotre 2.3.5 not work cart and icons

SOLVED

Multi Sotre 2.3.5 not work cart and icons

Hi,

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.

Images:

https://ibb.co/ZhGD1bS  https://ibb.co/MckQwVW

 

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);

 

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Multi Sotre 2.3.5 not work cart and icons

please remove the current symlink and add new
to remove 

rm pub

NOTE: do not add a trailing slash while removing the symlink 

 

Now create a new symlink using : 

ln -s ../pub

View solution in original post

12 REPLIES 12

Re: Multi Sotre 2.3.5 not work cart and icons

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 "*" 

 

Re: Multi Sotre 2.3.5 not work cart and icons

Thanks for answering.

 

Yes putting the line in the .htaccess the icons are seen, but the add to cart and other javascript functionalities still do not work.

 

At site 1 everything is working.

 

Do you know what I can do more?

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone

Re: Multi Sotre 2.3.5 not work cart and icons

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 !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Multi Sotre 2.3.5 not work cart and icons

@Perla Simeone ,

any JS errors are there in the browser console?
can you share a screenshot of that?

Re: Multi Sotre 2.3.5 not work cart and icons

Hi,

this is a screen the console.

But not view anithing very important...Smiley Frustrated 

https://www.es.revocompany.com/found-mr-ltd.html

https://www.new.revocompany.com/found-mr-ltd.html

 

https://ibb.co/fYHJ4FP 

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone

Re: Multi Sotre 2.3.5 not work cart and icons

@Perla Simeone ,

login into Admin

navigate to 
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. 

 

 

Re: Multi Sotre 2.3.5 not work cart and icons

Hi,

I can't make it work

Now I don't get the css

 

https://ibb.co/5cZ1W07
https://ibb.co/hZx4jwb

 

https://www.es.revocompany.com/

https://www.new.revocompany.com/

 

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone

Re: Multi Sotre 2.3.5 not work cart and icons

@Perla Simeone ,

 

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

 

Re: Multi Sotre 2.3.5 not work cart and icons

Hi,

there are two folders one for new where the magento is and one for es and I have the symlinks.

So it must be okay? but I can't make it work.

 

https://ibb.co/5cZ1W07

Front End Developer - Magento experience
E-commerce Chile
Perla Simeone