3

I think you have to look into the core Magento unit test code how they use and get base URL. I am not sure about this is what I shared is exactly you want, but I think it will help you. Look into the Magento core test module. vendor/magento/module-cms/Test/Unit/Helper/Wysiwyg/ImagesTest.php Find the function public function testGetBaseUrl() inside this ...


3

namespace Star\Trek\Test\Unit\Model; class BeyondTest extends \PHPUnit\Framework\TestCase { protected $_storeManager; public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, ) { $this->_storeManager = $storeManager; } /** * Prining URLs using StoreManagerInterface ...


3

I think before calling getBaseUrl() you need to set your current store then you can get correct URL. $this->storeManager->setCurrentStore($storeId); Where $storeId is your store Id which you want the base URL.


2

You can add store URL in static block: <a href="{{store direct_url='identifier'}}">Your link</a>


2

http://localhost/phpmyadmin/index.php Open core_config_data table in database web/unsecure/base_url => http://127.0.0.1/magento232/ web/secure/base_url = > https://127.0.0.1/magento232/ see attched image Then run command in terminal/putty php bin/magento cache:clean php bin/magento cache:flush php bin/magento indexer:reindex php bin/magento setup:...


2

I know maybe this isn't the answer you are expected but I have a different docker compose file for each project. Once I've finished working on one project I docker-compose down -v project, switch to my working copy in my other project and docker-compose up -d Each project has it's own set of containers which build up a lamp stack. So own db container. But ...


2

For question number 1: — You can go to docker-compose file and look for apache service then change port to something like 8085:80 then your project baseURL would be like 127.0.0.1:8085 or http://localhost:8085/ For question number 2: — I believe, 1 docker file for 1 project only. Otherwise, you need to create another docker file for another project.


1

See table (core_config_data) in your database. Search below paths under path column: (web/unsecure/base_url) and set Url without https. (web/secure/base_url) and set Url with https. After that your website will work fine.


1

all you need is to create your store/website in magento, define base url. add DNS record and point to your ip address. in nginx or htaccess write store code assigned to your new shop view: https://devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_over.html https://devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html Each ...


1

Please check all below steps: First off all see that the database is exported to the new server. Then transfer the magento root files to the new server. In the root folder, change to the new database. You can do this by going to app/etc/env.php and changing the DB array information. change the host, dbname, username and password to the new one. Then you ...


1

My lib/web folder was empty, I got them from by Backup. When I searched for locate _email-extend.less I found the mission files. I did penetration testing, I got some duplicate theme files in my pub/static/theme, On deleting them something wrong happened. Still dont know how this files generated. Finally to recover I did the steps again. rm -rf var/di/* ...


Only top voted, non community-wiki answers of a minimum length are eligible