Advertisement
Guest User

Untitled

a guest
Feb 27th, 2011
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. /**
  2.  * @ingroup forms
  3.  * @see
  4.  *   uc_product_forms()
  5.  *   uc_catalog_buy_it_now_form_validate()
  6.  *   uc_catalog_buy_it_now_form_submit()
  7.  */
  8. function uc_catalog_buy_it_now_form($form_state, $node) {
  9.   $form = array();
  10.   $form['#validate'][] = 'uc_catalog_buy_it_now_form_validate';
  11.   $form['#submit'][] = 'uc_catalog_buy_it_now_form_submit';
  12.   $form['nid'] = array('#type' => 'hidden', '#value' => $node->nid);
  13.   $form['submit'] = array(
  14.     '#type' => 'submit',
  15.     '#value' =>  variable_get('uc_teaser_add_to_cart_text', t('Add to cart')),
  16.     '#id' => 'edit-submit-'. $node->nid,
  17.     '#attributes' => array(
  18.       'class' => 'list-add-to-cart',
  19.     ),
  20.   );
  21.  
  22.   uc_form_alter($form, $form_state, __FUNCTION__);
  23.  
  24.   return $form;
  25. }
  26.  
  27.  
  28.   /**
  29. * UBERCART ALTER BUY IT NOW BUTTON
  30. */
  31.  
  32. function hbhelpers_form_uc_catalog_buy_it_now_form_alter(&$form, &$form_state) {
  33.   $form['submit']['#value']=  t('Yes i want one');
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement