You shouldn't delete the store with id 1.
In the method Mage_Code_Model_App::getStore
there is this
if (!Mage::isInstalled() || $this->getUpdateMode()) {
return $this->_getDefaultStore();
}
This means that when you are installing, or running upgrade scripts, the result of _getDefaultStore
is used as a store.
_getDefaultStore()
looks like this:
protected function _getDefaultStore()
{
if (empty($this->_store)) {
$this->_store = Mage::getModel('core/store')
->setId(self::DISTRO_STORE_ID)
->setCode(self::DISTRO_STORE_CODE);
}
return $this->_store;
}
And since the constant DISTRO_STORE_ID
is 1
, this means that for installing and running upgrade scripts the store with ID 1 is used. Deleting it can cause malfunctions.
Try to change the id of a store view (the default one) to 1. The constraints on the tables should change it everywhere else. This process may take a while, so be patient. And back-up your database before trying it.
here is what I did in a similar case.
Let's say you have 2 websites with 2 store view each. both website have a EN and a DE store view (codes can be anything).
First create 2 folders in the root of your magento install with 2 subfolders each.
Then copy index.php
and .htaccess
into website1
, website1/en
, website1/de
. Do the same for website2
and its subfolders.
Now edit index.php
from all the folders and subfolders like this:
website1/index.php
and website2/index.php
replace $mageFilename = MAGENTO_ROOT . '/app/Mage.php';
with $mageFilename = '../app/Mage.php';
and
Mage::run($mageRunCode, $mageRunType);
with
Mage::run('website code here for each website', 'website');
Then in the index.php
of each of the de|en
folders
change $mageFilename = MAGENTO_ROOT . '/app/Mage.php';
to $mageFilename = '.././app/Mage.php';
and
Mage::run($mageRunCode, $mageRunType);
to
Mage::run('each store view code here', 'store');
Now remove the Show store codes in url
flag.
In System->Configuration->web->unsecure
set the these values
Base Skin URL
: http://example.com/skin/
instead of {{unsecure_base_url}}skin/
Base Media URL
: http://example.com/media/
instead of {{unsecure_base_url}}media/
Base JavaScript URL
: http://example.com/js/
instead of {{unsecure_base_url}}js/
Do the same for the secure section if you are using secure urls just put https
instead of http
.
Now you have to create 2 virtual hosts, one for each website.
The document root for the first website will be website1
folder and for the second one website2
.
If you want you can create only one folder website1
but this means that you have to create the en
and de
folders in the root folder of your magento instance for the second website and your second website has to have the document root, the root of your magento instance.
Best Answer
Go in Catalog -> Manage Categories switch your view to US and see if your products are assigned to the category that you want.
If they are not assigned, do assign them once more and then flush cache, reindex and see what happens.