// Normalize

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12691 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-25 16:39:34 +00:00
parent b2e21e6ce1
commit 359b51d1ea
14 changed files with 61 additions and 64 deletions
@@ -84,7 +84,7 @@ class AdminCartRulesControllerCore extends AdminController
$this->afterAdd($currentObject);
}
// TODO Move this function into CartRule
/* @TODO Move this function into CartRule */
public function afterAdd($currentObject)
{
// Add restrictions for generic entities like country, carrier and group
@@ -289,20 +289,20 @@ class AdminCartRulesControllerCore extends AdminController
// All the filter are prefilled with the correct information
$customer_filter = '';
if (Validate::isUnsignedId($current_object->id_customer) AND
$customer = new Customer($current_object->id_customer) AND
if (Validate::isUnsignedId($current_object->id_customer) &&
($customer = new Customer($current_object->id_customer)) &&
Validate::isLoadedObject($customer))
$customer_filter = $customer->firstname.' '.$customer->lastname.' ('.$customer->email.')';
$gift_product_filter = '';
if (Validate::isUnsignedId($current_object->gift_product) AND
$product = new Product($current_object->gift_product, false, Context::getContext()->language->id) AND
if (Validate::isUnsignedId($current_object->gift_product) &&
($product = new Product($current_object->gift_product, false, Context::getContext()->language->id)) &&
Validate::isLoadedObject($product))
$gift_product_filter = trim($product->reference.' '.$product->name);
$reduction_product_filter = '';
if (Validate::isUnsignedId($current_object->reduction_product) AND
$product = new Product($current_object->reduction_product, false, Context::getContext()->language->id) AND
if (Validate::isUnsignedId($current_object->reduction_product) &&
($product = new Product($current_object->reduction_product, false, Context::getContext()->language->id)) &&
Validate::isLoadedObject($product))
$reduction_product_filter = trim($product->reference.' '.$product->name);