I was assigned a Magento 1.9.3 project that would take in products in JSON format, and save customer group prices. However, even though there are no errors, nothing gets saved. The group prices won't show in the admin panel nor in the catalogue as expected.

Why is this? I've looked up every single article or stackexchange cases concerning group prices, but none of these seem to solve my problem.

Currently using the catalog_block_product_list_collection event.

$group_prices = $theProduct->getData('group_price');
if (is_null($group_prices)) {
    $attribute = $theProduct->getResource()->getAttribute('group_price');
    if ($attribute) {
        $group_prices = $theProduct->getData('group_price');

    $group_prices = array();
    $theProduct->addData(array('group_price' => $group_prices));

$new_price = array(array (
    'price'=> $singleProduct->Price));
$group_prices = array_merge($group_prices, $new_price);

$currentStore = Mage::app()->getStore()->getId();
    $size = count($group_prices);

    // First Delete all the group prices of product
    $theProduct->setData('group_price', array());
    // Again save the old prices and new prices
    $theProduct->setData('group_price', $group_prices);
} catch(Exception $e) {
    echo $e->getMessage();

And yet, no group prices are saved when checking in the admin panel. Any help is appreciated.

1 Answer 1


Try below code

try {
$product1 = $product2 = Mage::getModel('catalog/product')->setStoreId(1)->load(34);
$product1->setData('group_price', array());

$product2->setData('group_price',array (
    array (
        "website_id" => 0,
        "cust_group" => 1,
        "price" => 101
} catch (Exception $ex) {
    echo $ex->getMessage();
} catch (Mage_Core_Exception $e) {
    echo $e->getMessage();
  • Thanks for the quick reply. I've tried this multiple times, but it still does not solve my problem. Nov 28, 2017 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.