0

I am Using Magento 1.9.1.0 CE. Now I need to display or get the current group groupprice and Tier Price. I have google it, Most of the answer Related to ver 1.7 Magento .but its not resolving the Magento 1.9.1.0 or Need to check whether Tier Price and Group Price set the particular Customer Group.

1

Here $product is the product Object.

Group Price:-

$roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
$grp_price = $product->getData('group_price');
$customer_groupprice = $grp_price[$roleId]['price'];

Here the current customer Group ID $roleId. $customer_groupprice is the customer Group Price.

Tier Price:-

$roleId = Mage::getSingleton('customer/session')->getCustomerGroupId();
$TierPrice = $product->getData('tier_price');
$customer_grouptier = array_column($TierPrice, 'price','cust_group');
$customer_tier = $customer_grouptier[$roleId]; 

Below the Conditions to check whether the Tier and Group Price Set or not

if(!empty($customer_groupprice))
{
echo "Customer Group Price is set";
}
else
{
echo "Customer Group Price Not Set";
}

if(!empty($customer_tier))
{
echo "Customer Tier Price is set";
}
else
{
echo "Customer Tier Price Not Set";
}
  • Great its working now. – JohnS Nov 28 '16 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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