title: How can I update a group price programmatically in Magento 1.7.0.2?
body: <p>I am trying to update my group prices (<strong>I have one customer group with id =4</strong>)
  but I am stack...</p>
  
  <p>First I need to <strong>get a product by SKU</strong>(in my example sku=1838) 
  and then get the price and group price of this specific product.<strong>This I have done it</strong> </p>
  
  <p>I have made the script below which runs in Magento 1.7.02.
  It justs gets the product by SKU and gets also its price.</p>
  
  <p>I have 2 questions</p>
  
  <p><strong>a) How can i get the group price of this specific SKU?</strong></p>
  
  <p><strong>b) And how can I update only the group price?</strong></p>
  
  <p>the script that I have made so far is below.</p>
  
  <pre><code>    &lt;?php
      header('Content-Type: text/html; charset=utf-8');
  
      require 'app/Mage.php';
  
      if (!Mage::isInstalled()) {
          echo "Application is not installed yet, please complete install wizard first.";
          exit;
      }
  
      // Only for urls
      // Don't remove this
      $_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
      $_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
  
      Mage::app('admin')-&gt;setUseSessionInUrl(false);
  
      umask(0);
  
      error_reporting(E_ALL | E_STRICT);
      $mageFilename = 'app/Mage.php';
      require_once $mageFilename;
      Mage::setIsDeveloperMode(true);
      umask(0);
      Mage::app();
      Mage::app()-&gt;setCurrentStore(Mage::getModel('core/store')-&gt;load(Mage_Core_Model_App::ADMIN_STORE_ID));
  
  
      $SKU = "1838";
  
      $productid = Mage::getModel('catalog/product')
                            -&gt;getIdBySku(trim($SKU));
  
      // Initiate product model
      $product = Mage::getModel('catalog/product');
  
      // Load specific product whose tier price want to update
      $product -&gt;load($productid);
  
      /* print_r($product-&gt;getData()); */
      print_r($product-&gt;getName());
      print_r($product-&gt;getPrice()); 
  
     ?&gt;
  </code></pre>
  
  <p><strong>Could you suggest anything on a) and b) questions?</strong></p>