本文整理汇总了PHP中OrderSlip::getSlipsIdByDate方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderSlip::getSlipsIdByDate方法的具体用法?PHP OrderSlip::getSlipsIdByDate怎么用?PHP OrderSlip::getSlipsIdByDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderSlip
的用法示例。
在下文中一共展示了OrderSlip::getSlipsIdByDate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
public function postProcess()
{
if (Tools::isSubmit('submitPrint')) {
if (!Validate::isDate(Tools::getValue('date_from'))) {
$this->_errors[] = $this->l('Invalid from date');
}
if (!Validate::isDate(Tools::getValue('date_to'))) {
$this->_errors[] = $this->l('Invalid end date');
}
if (!sizeof($this->_errors)) {
$orderSlips = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to'));
if (count($orderSlips)) {
Tools::redirectAdmin('pdf.php?slips&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')) . '&token=' . $this->token);
}
$this->_errors[] = $this->l('No order slips found for this period');
}
}
return parent::postProcess();
}
示例2: postProcess
public function postProcess()
{
if (Tools::getValue('submitAddorder_slip')) {
if (!Validate::isDate(Tools::getValue('date_from'))) {
$this->errors[] = $this->l('Invalid "From" date');
}
if (!Validate::isDate(Tools::getValue('date_to'))) {
$this->errors[] = $this->l('Invalid "To" date');
}
if (!count($this->errors)) {
$order_slips = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to'));
if (count($order_slips)) {
Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf') . '&submitAction=generateOrderSlipsPDF&date_from=' . urlencode(Tools::getValue('date_from')) . '&date_to=' . urlencode(Tools::getValue('date_to')));
}
$this->errors[] = $this->l('No order slips were found for this period.');
}
} else {
return parent::postProcess();
}
}
示例3: generateOrderSlipsPDF
function generateOrderSlipsPDF()
{
$orderSlips = OrderSlip::getSlipsIdByDate($_GET['date_from'], $_GET['date_to']);
if (!count($orderSlips)) {
die(Tools::displayError('No order slips found'));
}
PDF::multipleOrderSlips($orderSlips);
}
示例4: processGenerateOrderSlipsPDF
public function processGenerateOrderSlipsPDF()
{
$id_order_slips_list = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to'));
if (!count($id_order_slips_list)) {
die(Tools::displayError('No order slips were found.'));
}
$order_slips = array();
foreach ($id_order_slips_list as $id_order_slips) {
$order_slips[] = new OrderSlip((int) $id_order_slips);
}
$this->generatePDF($order_slips, PDF::TEMPLATE_ORDER_SLIP);
}
示例5: processGenerateOrderSlipsPDF
public function processGenerateOrderSlipsPDF()
{
$id_order_slips_list = OrderSlip::getSlipsIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to'));
if (!count($id_order_slips_list)) {
die($this->trans('No order slips were found.', array(), 'Admin.OrdersCustomers.Notification'));
}
$order_slips = array();
foreach ($id_order_slips_list as $id_order_slips) {
$order_slips[] = new OrderSlip((int) $id_order_slips);
}
$this->generatePDF($order_slips, PDF::TEMPLATE_ORDER_SLIP);
}