Esempio n. 1
0
 function change_discount()
 {
     $d = JRequest::get('post');
     $ps_order_change = new ps_order_change($d['order_id']);
     $ps_order_change->change_discount($d['order_id'], $d['order_discount']);
     //productquantity_'+arr[1]
     //die();
     $msg = 'Discount Updated';
     $link = 'index.php?option=com_onepage&view=order_details&order_id=' . $d['order_id'];
     $scrolly = JRequest::getVar('scrolly', 0);
     $link .= '&scrolly=' . $scrolly;
     $link .= '&op_curtab=' . JRequest::getVar('op_curtab', '');
     $this->setRedirect($link, $msg);
 }
Esempio n. 2
0
if (vmGet($_REQUEST, 'page') == 'order.order_print') {
    $ps_order_change = new ps_order_change($order_id);
    if (vmGet($_REQUEST, 'change_bill_to') != '') {
        $ps_order_change->change_bill_to();
    } elseif (vmGet($_REQUEST, 'change_ship_to') != '') {
        $ps_order_change->change_ship_to();
    } elseif (vmGet($_REQUEST, 'change_customer_note') != '') {
        $ps_order_change->change_customer_note();
    } elseif (vmGet($_REQUEST, 'change_standard_shipping') != '') {
        $ps_order_change->change_standard_shipping();
    } elseif (vmGet($_REQUEST, 'change_shipping') != '') {
        $ps_order_change->change_shipping($order_id, vmRequest::getFloat('order_shipping'));
    } elseif (vmGet($_REQUEST, 'change_shipping_tax') != '') {
        $ps_order_change->change_shipping_tax($order_id, vmRequest::getFloat('order_shipping_tax'));
    } elseif (vmGet($_REQUEST, 'change_discount') != '') {
        if ($ps_order_change->change_discount($order_id, trim(vmGet($_REQUEST, 'order_discount')))) {
            $vmLogger->err("Invalid Order Item ID!");
        } else {
            $vmLogger->info($VM_LANG->_('PHPSHOP_COUPON_DISCOUNT') . $VM_LANG->_('PHPSHOP_ORDER_EDIT_SOMETHING_HAS_CHANGED'));
        }
    } elseif (vmGet($_REQUEST, 'change_coupon_discount') != '') {
        if ($ps_order_change->change_coupon_discount($order_id, trim(vmGet($_REQUEST, 'coupon_discount')))) {
            $vmLogger->err("Discount is not a number!");
        } else {
            $vmLogger->info($VM_LANG->_('PHPSHOP_COUPON_DISCOUNT') . $VM_LANG->_('PHPSHOP_ORDER_EDIT_SOMETHING_HAS_CHANGED'));
        }
    } elseif (vmGet($_REQUEST, 'change_delete_item') != '') {
        if ($ps_order_change->change_delete_item($order_id, vmGet($_REQUEST, 'order_item_id'))) {
            $vmLogger->err("Discount is not a number!");
        } else {
            $vmLogger->info($VM_LANG->_('PHPSHOP_ORDER_EDIT_PRODUCT_DELETED'));