public static function getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute = null, $id_customer = 0, $id_cart = 0, $real_quantity = 0)
 {
     $specific_price = parent::getSpecificPrice($id_product, $id_shop, $id_currency, $id_country, $id_group, $quantity, $id_product_attribute, $id_customer, $id_cart, $real_quantity);
     if (Module::isEnabled('loyaltydiscount')) {
         include_once _PS_MODULE_DIR_ . DIRECTORY_SEPARATOR . 'loyaltydiscount' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'LoyaltyDiscount.php';
         LoyaltyDiscountModel::applyPossibleDiscount($id_product, $id_shop, $specific_price);
     }
     return $specific_price;
 }
 public function processSave()
 {
     $id_produt_purchased = Tools::getValue('id_product_purchased');
     $id_produt_discounted = Tools::getValue('id_product_discounted');
     if ($id_produt_purchased == $id_produt_discounted) {
         $this->errors[] = Tools::displayError($this->l('Products purchased and discounted cannot be the same.'));
     }
     $obj = $this->loadObject(true);
     if (($id_produt_purchased != $obj->id_product_purchased || $id_produt_discounted != $obj->id_product_discounted) && LoyaltyDiscountModel::loyaltyDiscountExists($id_produt_purchased, $id_produt_discounted)) {
         $this->errors[] = Tools::displayError($this->l('There are already a loyalty discount with this current product configuration.'));
     }
     return parent::processSave();
 }