From: Verdon V. <ve...@us...> - 2008-12-03 22:17:52
|
Update of /cvsroot/phpwebsite-comm/modules/vshop/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32766/class Modified Files: vShop.php vShop_Forms.php Log Message: added notices to status updates Index: vShop.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vShop.php 3 Dec 2008 20:37:49 -0000 1.3 --- vShop.php 3 Dec 2008 22:17:42 -0000 1.4 *************** *** 309,312 **** --- 309,316 ---- $this->order->save(); $this->forwardMessage(sprintf(dgettext('vshop', 'Order %s status updated.'), $this->order->id)); + if (isset($_POST['notice'])) { + $this->sendNotice($this->order->id, 'customer', 'status'); + $this->sendNotice($this->order->id, 'admin', 'status'); + } $url = 'index.php?module=vshop&aop=menu&tab=orders'; $js['location'] = $url; *************** *** 1264,1268 **** $message .= sprintf(dgettext('vshop', 'Your order id# %s at %s has been updated.'), $id, $shop_name) . "\n\n"; $message .= "\n\n"; ! } } elseif ($to == 'admin') { $sendto = sprintf('%s<%s>', $shop_name, $shop_email); --- 1268,1277 ---- $message .= sprintf(dgettext('vshop', 'Your order id# %s at %s has been updated.'), $id, $shop_name) . "\n\n"; $message .= "\n\n"; ! } elseif ($type == 'status') { ! $subject = dgettext('vshop', 'Your order status has been updated.'); ! $message .= sprintf(dgettext('vshop', 'Your order id# %s at %s has been updated. '), $id, $shop_name) . "\n\n"; ! $message .= sprintf(dgettext('vshop', 'The order status has been changed to %s.'), $this->order->getStatus(true)) . "\n\n"; ! $message .= "\n\n"; ! } } elseif ($to == 'admin') { $sendto = sprintf('%s<%s>', $shop_name, $shop_email); *************** *** 1282,1285 **** --- 1291,1299 ---- $message .= sprintf(dgettext('vshop', 'Order id# %s has been updated at %s.'), $id, $shop_name) . "\n\n"; $message .= "\n\n"; + } elseif ($type == 'status') { + $subject = dgettext('vshop', 'An order status has been updated.'); + $message .= sprintf(dgettext('vshop', 'Order id# %s at %s has been updated. '), $id, $shop_name) . "\n\n"; + $message .= sprintf(dgettext('vshop', 'The order status has been changed to %s.'), $this->order->getStatus(true)) . "\n\n"; + $message .= "\n\n"; } } Index: vShop_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/vshop/class/vShop_Forms.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vShop_Forms.php 3 Dec 2008 20:37:49 -0000 1.3 --- vShop_Forms.php 3 Dec 2008 22:17:42 -0000 1.4 *************** *** 500,509 **** $form = new PHPWS_Form('set_status'); require PHPWS_SOURCE_DIR . 'mod/vshop/inc/statuses.php'; $form->addHidden('module', 'vshop'); $form->addHidden('aop', 'update_status'); $form->addHidden('order_id', $order->id); $form->addSelect('status', $statuses); $form->setMatch('status', $order->status); ! $form->setLabel('status', sprintf(dgettext('vshop', 'Order %s status'), $order->id)); $form->addSubmit(dgettext('vshop', 'Update')); --- 500,516 ---- $form = new PHPWS_Form('set_status'); require PHPWS_SOURCE_DIR . 'mod/vshop/inc/statuses.php'; + $form->addHidden('module', 'vshop'); $form->addHidden('aop', 'update_status'); $form->addHidden('order_id', $order->id); + $form->addSelect('status', $statuses); $form->setMatch('status', $order->status); ! $form->setLabel('status', dgettext('vshop', 'Order status')); ! ! $form->addCheckbox('notice', 1); ! $form->setMatch('notice', 1); ! $form->setLabel('notice', dgettext('vshop', 'Send notification?')); ! $form->addSubmit(dgettext('vshop', 'Update')); *************** *** 613,621 **** $form->addTextField('shipping_minimum', number_format(PHPWS_Settings::get('vshop', 'shipping_minimum'), 2, '.', ',')); ! $form->setLabel('shipping_minimum', dgettext('vshop', 'Minimum shipping charge (0 to disable)')); $form->setSize('shipping_minimum', 6); $form->addTextField('shipping_maximum', number_format(PHPWS_Settings::get('vshop', 'shipping_maximum'), 2, '.', ',')); ! $form->setLabel('shipping_maximum', dgettext('vshop', 'Free shipping if total is over (0 to disable)')); $form->setSize('shipping_maximum', 6); --- 620,628 ---- $form->addTextField('shipping_minimum', number_format(PHPWS_Settings::get('vshop', 'shipping_minimum'), 2, '.', ',')); ! $form->setLabel('shipping_minimum', dgettext('vshop', 'Minimum shipping charge of x.xx (0 to disable)')); $form->setSize('shipping_minimum', 6); $form->addTextField('shipping_maximum', number_format(PHPWS_Settings::get('vshop', 'shipping_maximum'), 2, '.', ',')); ! $form->setLabel('shipping_maximum', dgettext('vshop', 'Free shipping if total is over xx.xx (0 to disable)')); $form->setSize('shipping_maximum', 6); |