Jump to content

[Resolved] Change Store url outside the admin


Michaeljm

Recommended Posts

Other than a field on the SSL tab in Store Settings, CC5/6 is very capable of determining where it is.

If a request for a page successfully arrives as a web server, the web server makes certain information available to PHP. This information includes the "hostname" and "path/scriptname" of the request. Then, CubeCart can query this information from PHP and figure out where it is.

Therefore, there is no longer any need to declare hostnames and paths in the global.inc.php file.

You can. in fact, include those statements in global.inc.php, but that may lead to certain things about CubeCart to be broken.

Link to comment
Share on other sites

Using an external database utility, such as phpMyAdmin, look in the table Cubecart_config. Find a record where the value in the 'name' column is "config". The associated value in the 'array' column has everything that is seen in Store Settings. This value is BASE_64 encoded, so to be able to read it, that value will need to be BASE_64 decoded. The phpMyAdmin may have the ability to do this directly on the cell's contents when viewing the table.

Once decoded, you will be looking for "standard_url".

A utility program that can access the database config table can be obtained which makes changing Store Settings outside of CubeCart easier.

Or. in /includes/global.inc.php, you can add the following statements. They will override whatever is set in Store Settings.

$glob['storeURL'] = 'http://www.example.com/store';
$glob['standard_url'] = 'http://www.example.com/store';
$glob['ssl_url'] = 'https://www.example.com/store';
$glob['cookie_domain'] = '.example.com';
$glob['rootRel'] = '/store/'; // Use a single slash, /,  for no path.

Do you know why it is that you cannot access the admin?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...