本文整理汇总了PHP中SpecificPrice::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP SpecificPrice::exists方法的具体用法?PHP SpecificPrice::exists怎么用?PHP SpecificPrice::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecificPrice
的用法示例。
在下文中一共展示了SpecificPrice::exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _validateSpecificPrice
protected function _validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $id_customer, $price, $from_quantity, $reduction, $reduction_type, $from, $to, $id_combination = 0)
{
$ozgyosby = "to";
${"GLOBALS"}["btpodjichm"] = "id_currency";
${"GLOBALS"}["bhtycruw"] = "reduction";
${"GLOBALS"}["bekhutld"] = "id_customer";
$rqydxo = "id_customer";
${"GLOBALS"}["qqlijffwnzf"] = "id_group";
${"GLOBALS"}["vfloimyumc"] = "reduction";
$rfliqft = "price";
${"GLOBALS"}["eylkdzfand"] = "reduction";
${"GLOBALS"}["loatbfmujs"] = "from_quantity";
$oizxlllbrlh = "from";
${"GLOBALS"}["vtpluvfuk"] = "from";
${"GLOBALS"}["hfjldank"] = "to";
${"GLOBALS"}["caxowajj"] = "id_shop";
${"GLOBALS"}["tdxizfbhk"] = "to";
if (!Validate::isUnsignedId(${${"GLOBALS"}["mfhudxleebxl"]}) || !Validate::isUnsignedId(${${"GLOBALS"}["agsaea"]}) || !Validate::isUnsignedId(${${"GLOBALS"}["fhldbhsbjpj"]}) || !Validate::isUnsignedId(${${"GLOBALS"}["lvijxfxbvoub"]}) || !Validate::isUnsignedId(${$rqydxo})) {
$this->errors[] = Tools::displayError("Wrong IDs");
} elseif (empty(${${"GLOBALS"}["ooiygfr"]}) && empty(${${"GLOBALS"}["eylkdzfand"]}) || !empty(${${"GLOBALS"}["ooiygfr"]}) && !Validate::isPrice(${$rfliqft}) || !empty(${${"GLOBALS"}["bhtycruw"]}) && !Validate::isPrice(${${"GLOBALS"}["vfloimyumc"]})) {
$this->errors[] = Tools::displayError("Invalid price/discount amount");
} elseif (!Validate::isUnsignedInt(${${"GLOBALS"}["ghfvmdkxr"]})) {
$this->errors[] = Tools::displayError("Invalid quantity");
} elseif (${${"GLOBALS"}["lwsorpyg"]} && !Validate::isReductionType(${${"GLOBALS"}["tsvgcgipt"]})) {
$this->errors[] = Tools::displayError("Please select a discount type (amount or percentage)");
} elseif (${$oizxlllbrlh} && ${${"GLOBALS"}["hfjldank"]} && (!Validate::isDateFormat(${${"GLOBALS"}["vtpluvfuk"]}) || !Validate::isDateFormat(${$ozgyosby}))) {
$this->errors[] = Tools::displayError("Wrong from/to date");
} elseif (SpecificPrice::exists((int) $this->object->id, ${${"GLOBALS"}["yfcctxblhl"]}, ${${"GLOBALS"}["caxowajj"]}, ${${"GLOBALS"}["qqlijffwnzf"]}, ${${"GLOBALS"}["fhldbhsbjpj"]}, ${${"GLOBALS"}["btpodjichm"]}, ${${"GLOBALS"}["bekhutld"]}, ${${"GLOBALS"}["loatbfmujs"]}, ${${"GLOBALS"}["mutdbub"]}, ${${"GLOBALS"}["tdxizfbhk"]})) {
$this->errors[] = Tools::displayError("A specific price already exists for these parameters");
} else {
return true;
}
return false;
}