title: Magento - module is not updating prices on a per-website basis
body: <p>I am having trouble with a module that is supposed to update prices on a per-website basis.</p>
  
  <p>At the top of my module I have :</p>
  
  <pre><code>Mage::app()-&gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
  </code></pre>
  
  <p>This should mean that when I call the module (the module has a frontend) I am able to update prices etc as 'admin'. However, this just isn't happening. Currently I have gone on a few desperate efforts to get it working - seeing if number formats trip it up or indexes not reindexed, cache problems and anything else.</p>
  
  <p>The following snippet actually produces the right numbers but it just is not saving to the database. Any ideas?</p>
  
  <pre><code>$product = Mage::getModel('catalog/product')-&gt;
             setStoreId($storeId)-&gt;setWebsiteId($websites[$store])-&gt;
             loadByAttribute('sku',$price['SKU']);
  $oldprice=(float)str_replace(",","",$product-&gt;getPrice());
  
  if($newprice!=$oldprice) {
      Mage::log($product-&gt;getPrice());
      $product-&gt;setPrice(number_format($newprice,4,".",""));
      Mage::log($product-&gt;getPrice());
      $product-&gt;getResource()-&gt;saveAttribute($product, 'price');
      $product-&gt;save();
      Mage::log($product-&gt;getPrice());
      unset($product);
  }
  </code></pre>