Different discount for each customer

1) Create one custom customer attribute name it.”Discount”.
2) Add event to config file to perform this discount


3) Create observer at model folder to listen event.

 public function get_final_price($observer)
			$customer_id = Mage::getSingleton('customer/session')->getCustomerId();
			$customer = Mage::getModel('customer/customer')->load($customer_id);
			$customerDiscount = (int)$customer->getDiscount();
				$discount = number_format($customer->getDiscount(),0);
				$event = $observer->getEvent();
				$product = $event->getProduct();
				$product->original_price = $product->getPrice();   
				$totalDiscount = ($product->original_price * $discount)/100;
				$product->setFinalPrice($product->original_price - $totalDiscount);
				return $this;

4) give discount for particulate customer from admin manage customer section.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s