Новости Joomla

Вышли релизы безопасности Joomla 6.1.1 и Joomla 5.4.6

Релиз безопасности Joomla 6.1.1 и Joomla 5.4.6

Проект Joomla! рад сообщить о выходе Joomla 6.1.1 и Joomla 5.4.6. Это релизы безопасности и исправления ошибок для серий 5.x и 6.x.

0 Пользователей и 1 Гость просматривают эту тему.
  • 1 Ответов
  • 1307 Просмотров
*

xmocartx

  • Осваиваюсь на форуме
  • 18
  • 0 / 0
Здравствуйте, подскажите пожалуйста. Как в способе доставки изменить radio button на один выпадающий список?

Насколько я понял, за вывод отвечает файл shippings.php

Код формы выбора способа доставки:

Код
<form id = "shipping_form" name = "shipping_form" action = "<?php print $this->action ?>" method = "post" onsubmit = "return 

validateShippingMethods()">
<?php print $this->_tmp_ext_html_shipping_start?>
<table id = "table_shippings" cellspacing="0" cellpadding="0">
<?php foreach($this->shipping_methods as $shipping){?>
  <tr>
    <td style = "padding-top:5px; padding-bottom:5px">
      <input type = "radio" name = "sh_pr_method_id" id = "shipping_method_<?php print $shipping->sh_pr_method_id?>" value="<?php

print $shipping->sh_pr_method_id ?>" <?php if ($shipping->sh_pr_method_id==$this->active_shipping){ ?>checked = "checked"<?php } ?>

/>
      <label for = "shipping_method_<?php print $shipping->sh_pr_method_id ?>"><?php
      if ($shipping->image){
        ?><span class="shipping_image"><img src="<?php print $shipping->image?>" alt="<?php print htmlspecialchars($shipping-

>name)?>" /></span><?php
      }
      ?><?php print $shipping->name?> (<?php print formatprice($shipping->calculeprice); ?>)</label>
      <?php if ($this->config->show_list_price_shipping_weight && count($shipping->shipping_price)){ ?>
          <br />
          <table class="shipping_weight_to_price">
          <?php foreach($shipping->shipping_price as $price){?>
              <tr>
                <td class="weight">
                    <?php if ($price->shipping_weight_to!=0){?>
                        <?php print formatweight($price->shipping_weight_from);?> - <?php print formatweight($price-

>shipping_weight_to);?>
                    <?php }else{ ?>
                        <?php print _JSHOP_FROM." ".formatweight($price->shipping_weight_from);?>
                    <?php } ?>
                </td>
                <td class="price">
                    <?php print formatprice($price->shipping_price); ?>
                </td>
            </tr>
          <?php } ?>
          </table>
      <?php } ?>
      <div class="shipping_descr"><?php print $shipping->description?></div>
      <?php if ($shipping->delivery){?>
      <div class="shipping_delivery"><?php print _JSHOP_DELIVERY_TIME.": ".$shipping->delivery?></div>
      <?php }?>
      <?php if ($shipping->delivery_date_f){?>
      <div class="shipping_delivery_date"><?php print _JSHOP_DELIVERY_DATE.": ".$shipping->delivery_date_f?></div>
      <?php }?>      
      </td>
  </tr>
<?php } ?>
</table>
<br/>
<?php print $this->_tmp_ext_html_shipping_end?>
<input type = "submit" class = "button" value = "<?php print _JSHOP_NEXT ?>" />
</form>
« Последнее редактирование: 01.09.2013, 17:59:34 от xmocartx »
*

xmocartx

  • Осваиваюсь на форуме
  • 18
  • 0 / 0
Re: Способы доставки одним select(ом)
« Ответ #1 : 01.09.2013, 18:00:24 »
Решение:

Код
<form id = "shipping_form" name = "shipping_form" action = "<?php print $this->action ?>" method = "post" onsubmit = "return validateShippingMethods()">
<?php print $this->_tmp_ext_html_shipping_start?>
<select name = "sh_pr_method_id">
<?php foreach($this->shipping_methods as $shipping){?>
<option id = "shipping_method_<?php print $shipping->sh_pr_method_id?>" value="<?php print $shipping->sh_pr_method_id ?>" <?php if ($shipping->sh_pr_method_id==$this->active_shipping){ ?>selected<?php } ?>>
 <?php
      if ($shipping->image){
        ?><span class="shipping_image"><img src="<?php print $shipping->image?>" alt="<?php print htmlspecialchars($shipping->name)?>" /></span><?php
      }
      ?><?php print $shipping->name?> (<?php print formatprice($shipping->calculeprice); ?>)</option>


      <?php if ($this->config->show_list_price_shipping_weight && count($shipping->shipping_price)){ ?>
          <br />
          <?php foreach($shipping->shipping_price as $price){?>
                    <?php if ($price->shipping_weight_to!=0){?>
                        <?php print formatweight($price->shipping_weight_from);?> - <?php print formatweight($price->shipping_weight_to);?>
                    <?php }else{ ?>
                        <?php print _JSHOP_FROM." ".formatweight($price->shipping_weight_from);?>
                    <?php } ?>
                    <?php print formatprice($price->shipping_price); ?>
          <?php } ?>
      <?php } ?>
      <div class="shipping_descr"><?php print $shipping->description?></div>
      <?php if ($shipping->delivery){?>
      <div class="shipping_delivery"><?php print _JSHOP_DELIVERY_TIME.": ".$shipping->delivery?></div>
      <?php }?>
      <?php if ($shipping->delivery_date_f){?>
      <div class="shipping_delivery_date"><?php print _JSHOP_DELIVERY_DATE.": ".$shipping->delivery_date_f?></div>
      <?php }?>     
<?php } ?>
</select>
<?php print $this->_tmp_ext_html_shipping_end?>

<input type = "submit" class = "button" value = "<?php print _JSHOP_NEXT ?>" />
</form>
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться