@@ 898-904 (lines=7) @@ | ||
895 | $data['tax_class_id'] = 0; |
|
896 | } |
|
897 | ||
898 | if (isset($this->request->post['date_available'])) { |
|
899 | $data['date_available'] = $this->request->post['date_available']; |
|
900 | } elseif (!empty($product_info)) { |
|
901 | $data['date_available'] = ($product_info['date_available'] != '0000-00-00') ? $product_info['date_available'] : ''; |
|
902 | } else { |
|
903 | $data['date_available'] = date('Y-m-d'); |
|
904 | } |
|
905 | ||
906 | if (isset($this->request->post['quantity'])) { |
|
907 | $data['quantity'] = $this->request->post['quantity']; |
@@ 618-624 (lines=7) @@ | ||
615 | } |
|
616 | } |
|
617 | ||
618 | if (isset($this->request->post['date_start'])) { |
|
619 | $data['date_start'] = $this->request->post['date_start']; |
|
620 | } elseif (!empty($coupon_info)) { |
|
621 | $data['date_start'] = ($coupon_info['date_start'] != '0000-00-00' ? $coupon_info['date_start'] : ''); |
|
622 | } else { |
|
623 | $data['date_start'] = date('Y-m-d', time()); |
|
624 | } |
|
625 | ||
626 | if (isset($this->request->post['date_end'])) { |
|
627 | $data['date_end'] = $this->request->post['date_end']; |
|
@@ 626-632 (lines=7) @@ | ||
623 | $data['date_start'] = date('Y-m-d', time()); |
|
624 | } |
|
625 | ||
626 | if (isset($this->request->post['date_end'])) { |
|
627 | $data['date_end'] = $this->request->post['date_end']; |
|
628 | } elseif (!empty($coupon_info)) { |
|
629 | $data['date_end'] = ($coupon_info['date_end'] != '0000-00-00' ? $coupon_info['date_end'] : ''); |
|
630 | } else { |
|
631 | $data['date_end'] = date('Y-m-d', strtotime('+1 month')); |
|
632 | } |
|
633 | ||
634 | if (isset($this->request->post['uses_total'])) { |
|
635 | $data['uses_total'] = $this->request->post['uses_total']; |
@@ 768-774 (lines=7) @@ | ||
765 | $data['order_id'] = ''; |
|
766 | } |
|
767 | ||
768 | if (isset($this->request->post['date_ordered'])) { |
|
769 | $data['date_ordered'] = $this->request->post['date_ordered']; |
|
770 | } elseif (!empty($return_info)) { |
|
771 | $data['date_ordered'] = ($return_info['date_ordered'] != '0000-00-00' ? $return_info['date_ordered'] : ''); |
|
772 | } else { |
|
773 | $data['date_ordered'] = ''; |
|
774 | } |
|
775 | ||
776 | if (isset($this->request->post['customer'])) { |
|
777 | $data['customer'] = $this->request->post['customer']; |
@@ 605-611 (lines=7) @@ | ||
602 | $data['featured'] = 0; |
|
603 | } |
|
604 | ||
605 | if (isset($this->request->post['date_available'])) { |
|
606 | $data['date_available'] = $this->request->post['date_available']; |
|
607 | } elseif (!empty($post_info)) { |
|
608 | $data['date_available'] = ($post_info['date_available'] != '0000-00-00') ? $post_info['date_available'] : ''; |
|
609 | } else { |
|
610 | $data['date_available'] = date('Y-m-d'); |
|
611 | } |
|
612 | ||
613 | $this->load->model('setting/store'); |
|
614 |