// Context in modules + Shop::sql* methods

This commit is contained in:
rMalie
2011-07-19 09:23:10 +00:00
parent 6551a3ece7
commit ff81f71449
25 changed files with 127 additions and 263 deletions
+2 -2
View File
@@ -362,7 +362,7 @@ class ReferralProgram extends Module
if (!Validate::isLoadedObject($discount))
return false;
if ($params['cart']->checkDiscountValidity($discount, $params['cart']->getDiscounts(), $params['cart']->getOrderTotal(true, Cart::ONLY_PRODUCTS), $params['cart']->getProducts(), false, $this->shopID, $this->shopGroupID)===false)
if ($params['cart']->checkDiscountValidity($discount, $params['cart']->getDiscounts(), $params['cart']->getOrderTotal(true, Cart::ONLY_PRODUCTS), $params['cart']->getProducts(), false, $this->context->shop->getID(), $this->context->shop->getGroupID())===false)
{
global $smarty;
$smarty->assign(array('discount_display' => Discount::display($discount->value, $discount->id_discount_type, new Currency($params['cookie']->id_currency)), 'discount' => $discount));
@@ -438,7 +438,7 @@ class ReferralProgram extends Module
return false;
$sponsor = new Customer();
if ($sponsor = $sponsor->getByEmail($sponsorEmail, NULL, $this->shopGroupID, $this->shopID))
if ($sponsor = $sponsor->getByEmail($sponsorEmail, NULL, $this->context->shop->getGroupID(), $this->context->shop->getID()))
{
include_once(dirname(__FILE__).'/ReferralProgramModule.php');