2

How can i set different prices for customer group also a retailer should be able to see only his price but the dealer should be able to see the dealer price as well as the retailer price.

3
  • is retailer and dealer is a customer group?
    – Amit Bera
    Nov 3, 2014 at 7:52
  • yes, they are a customer group the idea is to show the dealer how much of a discount he is getting compared to other group members like retailer, partner etc Nov 3, 2014 at 7:55
  • from which page are you doing this?
    – Amit Bera
    Nov 3, 2014 at 8:29

1 Answer 1

1

Magento is provide to show customer group wise price and It is magento feature.

You can customer group wise from admin.So goto admin>Catalog>manage product>Select a product >Price tab > here you can get customer group wise price

This Price will show when a customer is logged in magento site

If want to show group wise price then check this Want to display an Image if a customer group has a special price

Edit:

code is

$groupPrices = $_product->getData('group_price');

if (is_null($groupPrices)) {
    $attribute = $_product->getResource()->getAttribute('group_price');
    if ($attribute) {
        $attribute->getBackend()->afterLoad($_product);
        $groupPrices = $_product->getData('group_price');
    }
}

if (is_null($groupPrices) || !is_array($groupPrices)) {
    return $_product->getPrice();
}


$matchedPrice = $_product->getPrice();
foreach ($groupPrices as $groupPrice) {
    if ($groupPrice['website_price'] < $matchedPrice) {
        $matchedPrice = $groupPrice['website_price'];
        echo  Mage::helper('core')->formatPrice($matchedPrice, false);
        break;
    }
}
3
  • Yes, i know that but it only shows the price that is assigned to the group but what is needed is that the dealer should be able to see prices of other groups as well but normal groups will be able to see only their price according to the priorities of the group thank you for your response Nov 3, 2014 at 7:58
  • I have 5 groups registered user:- can see only his price corporate user:- can see his and registered user price dealer:- can see his , registered and corporate price partner:- can see his, registered, dealer and corporate price staff:- can see all the prices Nov 3, 2014 at 8:00
  • check my code....
    – Amit Bera
    Nov 3, 2014 at 8:26

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.