изменить атрибут кнопочки в ubercart3

Главные вкладки

Аватар пользователя zlodiak zlodiak 12 августа 2013 в 13:53

помогите пожалуйста изменить значение атрибута value в форме заказа страницы корзины в ubercart3

пробую прописать в template.php следующее

<?phpfunction mstore_uc_cart_view_form($form){
    $form['buttons']['submit']['#value'] = t('bla');
    
    return theme_uc_cart_view_form($form);
}
?>

но не работает

вот полный код формы(извиняюсь за форматирование)

<?php<form accept-charset="UTF-8" id="uc-cart-view-form" method="post" action="/site_mstore/drupal7_mstore/cart"><div><table class="sticky-header" style="position: fixed; top: 0px; left: 152px; visibility: hidden;"><thead style="display: block;"><tr><th>Удалить</th><th>Товары</th><th></th><th><abbr title="Количество">Кол-во</abbr></th><th>Итого</th> </tr></thead></table><table class="sticky-enabled tableheader-processed sticky-table">
 <thead><tr><th>Удалить</th><th>Товары</th><th></th><th><abbr title="Количество">Кол-во</abbr></th><th>Итого</th> </tr></thead>
<tbody>
 <tr class="odd"><td class="remove"><input type="submit" class="form-submit" value="Удалить" name="remove-0" id="edit-items-0-remove"></td><td class="image"><a href="/site_mstore/drupal7_mstore/node/151"><img width="50" height="50" alt="" src="http://www.test1.ru/site_mstore/drupal7_mstore/sites/default/files/styles/uc_cart/public/img8_0.png?itok=032f1TOU" style="display: block; margin: 10px auto;"></a></td><td class="desc"><a href="/site_mstore/drupal7_mstore/node/151">Abbas Lucidus</a></td><td class="qty"><div class="form-item form-type-uc-quantity form-item-items-0-qty">
  <label for="edit-items-0-qty" class="element-invisible">Количество <span title="Это поле обязательно для заполнения." class="form-required">*</span></label>
 <input type="text" class="form-text required" maxlength="6" size="5" value="1" name="items[0][qty]" id="edit-items-0-qty">
</div>
</td><td class="price"><span class="uc-price">0 руб.</span></td> </tr>
 <tr class="even"><td class="remove"><input type="submit" class="form-submit" value="Удалить" name="remove-1" id="edit-items-1-remove"></td><td class="image"><a href="/site_mstore/drupal7_mstore/node/209"><img width="46" height="50" alt="" src="http://www.test1.ru/site_mstore/drupal7_mstore/sites/default/files/styles/uc_cart/public/imaD471.tmp.jpg?itok=y6Xz-UQN" style="display: block; margin: 10px auto;"></a></td><td class="desc"><a href="/site_mstore/drupal7_mstore/node/209">Cogo Lucidus</a></td><td class="qty"><div class="form-item form-type-uc-quantity form-item-items-1-qty">
  <label for="edit-items-1-qty" class="element-invisible">Количество <span title="Это поле обязательно для заполнения." class="form-required">*</span></label>
 <input type="text" class="form-text required" maxlength="6" size="5" value="1" name="items[1][qty]" id="edit-items-1-qty">
</div>
</td><td class="price"><span class="uc-price">10 руб.</span></td> </tr>
 <tr class="odd"><td class="remove"><input type="submit" class="form-submit" value="Удалить" name="remove-2" id="edit-items-2-remove"></td><td class="image"><a href="/site_mstore/drupal7_mstore/node/140"><img width="50" height="49" title="Blandit caecus meus te." alt="Aptent eum lobortis ymo." src="http://www.test1.ru/site_mstore/drupal7_mstore/sites/default/files/styles/uc_cart/public/imaA83E.tmp.jpg?itok=YPeOH6wu" style="display: block; margin: 10px auto;"></a></td><td class="desc"><a href="/site_mstore/drupal7_mstore/node/140">Ad Occuro Persto Zelus</a></td><td class="qty"><div class="form-item form-type-uc-quantity form-item-items-2-qty">
  <label for="edit-items-2-qty" class="element-invisible">Количество <span title="Это поле обязательно для заполнения." class="form-required">*</span></label>
 <input type="text" class="form-text required" maxlength="6" size="5" value="1" name="items[2][qty]" id="edit-items-2-qty">
</div>
</td><td class="price"><span class="uc-price">0 руб.</span></td> </tr>
 <tr class="even"><td class="subtotal" colspan="5"><span id="subtotal-title">Итого:</span> <span class="uc-price">10 руб.</span></td> </tr>
</tbody>
</table>
<div class="entity entity-uc-cart-item uc-cart-item-uc-cart-item clearfix">

      <h2>
                        </h2>
  
  <div class="content">
    <input type="hidden" value="a:3:{s:9:&quot;shippable&quot;;s:1:&quot;1&quot;;s:4:&quot;type&quot;;s:7:&quot;product&quot;;s:6:&quot;module&quot;;s:10:&quot;uc_product&quot;;}" name="items[0][data]">
<input type="hidden" value="24" name="items[0][cart_item_id]">
  </div>
</div>
<div class="entity entity-uc-cart-item uc-cart-item-uc-cart-item clearfix">

      <h2>
                        </h2>
  
  <div class="content">
    <input type="hidden" value="a:3:{s:9:&quot;shippable&quot;;s:1:&quot;1&quot;;s:4:&quot;type&quot;;s:7:&quot;product&quot;;s:6:&quot;module&quot;;s:10:&quot;uc_product&quot;;}" name="items[1][data]">
<input type="hidden" value="25" name="items[1][cart_item_id]">
  </div>
</div>
<div class="entity entity-uc-cart-item uc-cart-item-uc-cart-item clearfix">

      <h2>
                        </h2>
  
  <div class="content">
    <input type="hidden" value="a:3:{s:9:&quot;shippable&quot;;s:1:&quot;1&quot;;s:4:&quot;type&quot;;s:7:&quot;product&quot;;s:6:&quot;module&quot;;s:10:&quot;uc_product&quot;;}" name="items[2][data]">
<input type="hidden" value="26" name="items[2][cart_item_id]">
  </div>
</div>
<input type="hidden" value="form--zLw8uWMykIUCVUTpTO2zi6b48f0jPveuLfJmqCFq5w" name="form_build_id">
<input type="hidden" value="uc_cart_view_form" name="form_id">
<div id="edit-actions" class="form-actions form-wrapper"><a href="/site_mstore/drupal7_mstore/">Продолжить покупки</a><input type="submit" class="form-submit" value="Empty cart" name="op" id="edit-empty"><input type="submit" class="form-submit" value="Обновить корзину" name="update-cart" id="edit-update"><input type="submit" class="form-submit" value="Оформить заказ" name="op" id="edit-checkout--2"></div></div></form>?>

еще проблема в том, что форма содержит несколько кнопок с типом submit. мне же нужно изменить только ту, которая в td.remove input[type="submit"]

Комментарии