Page 1 of 1

Where is Base href generated?

Posted: Wed Oct 12, 2011 11:52 pm
by labeshops
It appears my issue with links is being caused by "<base href="<?php echo $base; ?>" />" in the header being generated incorrectly for the multistores.

For example, if you go to cosplaycostumecloset.com and view source, the base href correctly shows as cosplaycostumecloset.com.

BUT

Click on checkout link and view source and you will see the base href has changed itself to "http://www.allwicca.com/" not either ccc or the path set as my SSL path https://www.labeshops.com/.

Any idea where the $base variable is set? Or why it would switch itself to an unrelated store's path? I feel like I'm honing in on the problem, just still not sure how to solve it :(

Re: Where is Base href generated?

Posted: Wed Oct 12, 2011 11:54 pm
by labeshops
Okay quick update - I manually tried to set the base href to http://www.cosplaycostumecloset.com/ but it STILL switches itself to allwicca when you click on checkout. Which makes even LESS sense to me :(

Re: Where is Base href generated?

Posted: Wed Oct 12, 2011 11:57 pm
by jcsmithy
As I said in your previous post, your problem is down to running multiple stores via the same URL. it will always happen with the way you've configured your store, and would be a big job I think to get it working a different way.

Re: Where is Base href generated?

Posted: Thu Oct 13, 2011 1:10 am
by labeshops
The only thing I've done differently configuration wise is use the multistore SSL mod so all my stores use my SSL certificate. Other than that, it's standard opencart so I do not know what you mean.

Re: Where is Base href generated?

Posted: Tue Apr 26, 2016 7:49 pm
by luciddragon
Ok I have discovered by playing around that the $base href or config_url (header controller file) is grabbed from the config file config.php. This should be enough info to get going with :)

Re: Where is Base href generated?

Posted: Fri Nov 09, 2018 7:43 pm
by Pyrocrafter
I've changed the config.php files in the root and admin locations but still the href says http instead of https. Anyone have any ideas on how to change it?