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.

1
  • I cannot reproduce the issue. Works fine here. Did you set up the base URLs for the default scope/frontend stores correctly? Commented Feb 19, 2016 at 13:02

1 Answer 1

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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.