/[drupal]/contributions/modules/openresort/openresort.ecommerce.patch
ViewVC logotype

Diff of /contributions/modules/openresort/openresort.ecommerce.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8, Sat Oct 27 01:23:40 2007 UTC revision 1.9, Sun Jan 27 22:20:59 2008 UTC
# Line 446  Index: store/store.module Line 446  Index: store/store.module
446    
447   function store_transaction_product_fields() {   function store_transaction_product_fields() {
448  -  return array('txnid', 'nid', 'vid', 'title', 'price', 'qty', 'data');  -  return array('txnid', 'nid', 'vid', 'title', 'price', 'qty', 'data');
449  +  return array('txnid', 'nid', 'vid', 'title', 'price', 'qty', 'data','last_notify','dataid');  +  return array('txnid', 'nid', 'vid', 'title', 'price', 'qty', 'data','last_notify','dataid','item_status');
450   }   }
451    
452   function store_transaction_misc_fields() {   function store_transaction_misc_fields() {
453  @@ -925,29 +930,54 @@  @@ -925,29 +930,55 @@
454    * Save transaction products.    * Save transaction products.
455    */    */
456   function store_transaction_save_product($item) {   function store_transaction_save_product($item) {
# Line 476  Index: store/store.module Line 476  Index: store/store.module
476  +       if(isset($localdata->subitem)){  +       if(isset($localdata->subitem)){
477  +         $localsubitem = $localdata->subitem;  +         $localsubitem = $localdata->subitem;
478  +         while($key = key($localsubitem)){  +         while($key = key($localsubitem)){
479  +               if($status != 2){  +               if($status != 2){
480  +                       $queryresult = db_fetch_object(db_query("SELECT unit_id,status FROM {accommodation_availability} a INNER JOIN {accommodation_inventory} i ON a.iid = i.iid" .  +                       $queryresult = db_fetch_object(db_query("SELECT unit_id,status FROM {accommodation_availability} a INNER JOIN {accommodation_inventory} i ON a.iid = i.iid" .
481  +                       " WHERE aid =%d",$key));  +                       " WHERE aid =%d",$key));
482  +                       if($dataid ==0){  +                       if($dataid ==0){
# Line 492  Index: store/store.module Line 492  Index: store/store.module
492  +               $dataid = $item->nid;  +               $dataid = $item->nid;
493  +       }  +       }
494  +       $item -> dataid = $dataid;  +       $item -> dataid = $dataid;
495    +       $item -> item_status = $status;
496       $item->data = serialize($item->data);       $item->data = serialize($item->data);
497  +  }else{  +  }else{
498  +       $item -> dataid = $item->nid;  +       $item -> dataid = $item->nid;
# Line 512  Index: store/store.module Line 513  Index: store/store.module
513       module_invoke($item->ptype, 'productapi', $item, 'transaction', 'update');       module_invoke($item->ptype, 'productapi', $item, 'transaction', 'update');
514     }     }
515     else {     else {
516  @@ -1137,6 +1167,8 @@  @@ -1137,6 +1168,8 @@
517    
518   function store_send_invoice_email($txnid, $preview = null) {   function store_send_invoice_email($txnid, $preview = null) {
519     $t = store_transaction_load($txnid);     $t = store_transaction_load($txnid);
# Line 521  Index: store/store.module Line 522  Index: store/store.module
522    
523     if ($t->mail && valid_email_address($t->mail)) {     if ($t->mail && valid_email_address($t->mail)) {
524       $to = $t->mail;       $to = $t->mail;
525  @@ -1149,8 +1181,20 @@  @@ -1149,8 +1182,20 @@
526       return ec_mail_preview($mid, $to, $t);       return ec_mail_preview($mid, $to, $t);
527     }     }
528     elseif ($to && valid_email_address($to)) {     elseif ($to && valid_email_address($to)) {
# Line 543  Index: store/store.module Line 544  Index: store/store.module
544     else {     else {
545       return false;       return false;
546     }     }
547  @@ -1754,7 +1798,7 @@  @@ -1754,7 +1799,7 @@
548       // Now that we know the tables, apply the correct column display map.       // Now that we know the tables, apply the correct column display map.
549       $column_map = array(       $column_map = array(
550         'users'          => array(array('data' => t('user'), 'field' => 'u.uid')),         'users'          => array(array('data' => t('user'), 'field' => 'u.uid')),
# Line 552  Index: store/store.module Line 553  Index: store/store.module
553       );       );
554    
555       // Expand all query parts.       // Expand all query parts.
556  @@ -1775,7 +1819,7 @@  @@ -1775,7 +1820,7 @@
557       }       }
558       $columns = array_unique($columns);       $columns = array_unique($columns);
559       $header = _store_array_distinct($table, 'data');       $header = _store_array_distinct($table, 'data');
# Line 561  Index: store/store.module Line 562  Index: store/store.module
562       $header[] = t('operations');       $header[] = t('operations');
563    
564       // Get SQL sort clause.       // Get SQL sort clause.
565  @@ -1794,11 +1838,11 @@  @@ -1794,11 +1839,11 @@
566         // fields need special formatting.         // fields need special formatting.
567         foreach ($columns as $col) {         foreach ($columns as $col) {
568    
# Line 575  Index: store/store.module Line 576  Index: store/store.module
576           }           }
577           elseif ($col == 'uid') {           elseif ($col == 'uid') {
578             $username = db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $data->$col));             $username = db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $data->$col));
579  @@ -1844,8 +1888,8 @@  @@ -1844,8 +1889,8 @@
580         }         }
581    
582         // Count the number of items in this transaction         // Count the number of items in this transaction
# Line 586  Index: store/store.module Line 587  Index: store/store.module
587    
588         $row[] = l(t('edit'), $edit_uri, array(), $edit_params) .         $row[] = l(t('edit'), $edit_uri, array(), $edit_params) .
589                '<br />&nbsp;&nbsp;&nbsp;'. l(t('addresses'), "admin/store/transaction/edit/$data->txnid", array(), "section=addresses&". drupal_get_destination()) .                '<br />&nbsp;&nbsp;&nbsp;'. l(t('addresses'), "admin/store/transaction/edit/$data->txnid", array(), "section=addresses&". drupal_get_destination()) .
590  @@ -1877,18 +1921,37 @@  @@ -1877,18 +1922,37 @@
591         }         }
592       }       }
593     }     }
# Line 628  Index: store/store.module Line 629  Index: store/store.module
629     }     }
630    
631     return '';     return '';
632  @@ -1926,7 +1989,7 @@  @@ -1926,7 +1990,7 @@
633     }     }
634     $form['items'] = array(     $form['items'] = array(
635       '#type' => 'item',       '#type' => 'item',
# Line 637  Index: store/store.module Line 638  Index: store/store.module
638       '#value' => $items       '#value' => $items
639     );     );
640     $form['txnid'] = array(     $form['txnid'] = array(
641  @@ -1934,21 +1997,6 @@  @@ -1934,21 +1998,6 @@
642       '#value' => $txn->txnid       '#value' => $txn->txnid
643     );     );
644    
# Line 659  Index: store/store.module Line 660  Index: store/store.module
660     return $form;     return $form;
661   }   }
662    
663  @@ -2254,11 +2302,10 @@  @@ -2254,11 +2303,10 @@
664    
665     $header = array(     $header = array(
666       array('data' => t('ID'), 'field' => 'st.txnid', 'sort' => 'desc'),       array('data' => t('ID'), 'field' => 'st.txnid', 'sort' => 'desc'),
# Line 672  Index: store/store.module Line 673  Index: store/store.module
673       t('items ordered'),       t('items ordered'),
674       t('operations')       t('operations')
675     );     );
676  @@ -2275,17 +2322,16 @@  @@ -2275,17 +2323,16 @@
677       }       }
678    
679       $operations = array(l(t('view'), "store/transaction/view/$txn->txnid"));       $operations = array(l(t('view'), "store/transaction/view/$txn->txnid"));
# Line 693  Index: store/store.module Line 694  Index: store/store.module
694         format_plural($num_items, '1 item', '@count items'),         format_plural($num_items, '1 item', '@count items'),
695         implode('<br />', $operations)         implode('<br />', $operations)
696       );       );
697  @@ -2616,8 +2662,8 @@  @@ -2616,8 +2663,8 @@
698    * Implements hook_token_list() from the token module.    * Implements hook_token_list() from the token module.
699    */    */
700   function store_token_list($type = 'all') {   function store_token_list($type = 'all') {
# Line 704  Index: store/store.module Line 705  Index: store/store.module
705         ECMAIL_TYPE_SHIP_NOTICE))) {         ECMAIL_TYPE_SHIP_NOTICE))) {
706       $vars[STORE_TOKEN_TYPE]['txn-id']                = t('Transaction ID.');       $vars[STORE_TOKEN_TYPE]['txn-id']                = t('Transaction ID.');
707       $vars[STORE_TOKEN_TYPE]['txn-balance']           = t('Transaction balance.');       $vars[STORE_TOKEN_TYPE]['txn-balance']           = t('Transaction balance.');
708  @@ -2639,31 +2685,66 @@  @@ -2639,31 +2686,66 @@
709       $vars[STORE_TOKEN_TYPE]['txn-bill-plus-ship']    = t('Three other transaction tokens joined together: [txn-ship-to] [txn-shipping-method] [txn-bill-to].');       $vars[STORE_TOKEN_TYPE]['txn-bill-plus-ship']    = t('Three other transaction tokens joined together: [txn-ship-to] [txn-shipping-method] [txn-bill-to].');
710       $vars[STORE_TOKEN_TYPE]['txn-items']             = t('Listing of items in the transaction.');       $vars[STORE_TOKEN_TYPE]['txn-items']             = t('Listing of items in the transaction.');
711       $vars[STORE_TOKEN_TYPE]['site-url-brief']        = t('Site url without the protocol (http://).');       $vars[STORE_TOKEN_TYPE]['site-url-brief']        = t('Site url without the protocol (http://).');
# Line 775  Index: store/store.module Line 776  Index: store/store.module
776    
777       $values['txn-id']                = $txn->txnid;       $values['txn-id']                = $txn->txnid;
778       $values['txn-balance']           = payment_format($txn->gross);       $values['txn-balance']           = payment_format($txn->gross);
779  @@ -2685,11 +2766,18 @@  @@ -2685,11 +2767,18 @@
780       $values['txn-bill-plus-ship']    = check_plain($values['txn-ship-to'] . $values['txn-shipping-method'] . $values['txn-bill-to']);       $values['txn-bill-plus-ship']    = check_plain($values['txn-ship-to'] . $values['txn-shipping-method'] . $values['txn-bill-to']);
781       $values['txn-items']             = $items;       $values['txn-items']             = $items;
782       $values['site-url-brief']        = substr($base_url, strlen("http://"));       $values['site-url-brief']        = substr($base_url, strlen("http://"));

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.2