2

In Magento 1.7.0.2 I have a custom URL and path for admin.

The custom path it was set up in local.xml

<admin> <routers> <adminhtml> <args> <frontName>

And the custom URL on admin System > Config > Advanced > Admin > Admin Base URL

After that, the following lines are inserted in DB:

'1236','default','0','admin/url/custom','http://admin.mydomain.com/'
'1239','default','0','admin/url/use_custom_path','0'
'1240','stores','0','web/secure/base_url','https://admin.mydomain.com/'
'1241','stores','0','web/unsecure/base_url','http://admin.mydomain.com/'

When I use <?php echo Mage::getBaseUrl(); ?> is returning base URL for links of custom admin (http://admin.mydomain.com/index.php/)

Because of this behavior, it puts URL admin in the cart and checkout.

  • I cannot reproduce the issue. Works fine here. Did you set up the base URLs for the default scope/frontend stores correctly? – mam08ixo Feb 19 '16 at 13:02
0

The DB changes that you listed set the admin.mydomain.com as the secure and unsecure base_url. When you are calling the getBaseUrl function it is simply returning these values. In order to fix this issue you need to update the web/secure/base_url and web/unsecure/base_url back to what they should be (I am assuming something like www.mydomain.com). These values should be in the core_config table of your database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.