I need to replace the product price with group price for the product which is in the cart.[without logged in any customers].
I am getting a product from the cart and getting a price and other information. I am unable to get product customerGroupId and group price and all.
$cart = Mage::getModel('checkout/cart')->getQuote();
$cartItems = $cart->getAllVisibleItems();
foreach ($cartItems as $item)
{
//Mage::log(print_r($item->getCustomerGroupId(), true));
// Mage::log(print_r($item, true));
$item->setCustomerGroupId(4);
Mage::log(print_r($item->getPrice(), true));
Mage::log(print_r($item->getGroupPrice(), true));
}
The above code not able to print group price or unable to set product customerGroup
Help me to get an answer for this, Thanks in advance:)