Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Почему не рилииют кнопки увелилить в корзине значение не изменяется


talgatuza
 Share

Recommended Posts

Скажите пожалуйси когда я нажимая на кнопку увелилить кол-во товаров в корзине на гдесктопе не рилитет а на мобильной версии рилииет 

 

 

                 <span class="input-group-btn">
                                 <button class="btn btn-control btn-white border float-right  button-update" data-type="increase" data-product="{{ product.key }}">
                                     <span class="fas fa-chevron-up fa-increase"></span>     
                            </span>
                            <span class="input-group-btn">
                                <button class="btn btn-control btn-white border float-right button-update" data-type="decrease"  data-product="{{ product.key }}">
                                    <span class="fas fa-chevron-down fa-increase"></span>     
                                </button>    
вот сами кнопки 
вот вся разметка 
<div class="table d-none d-lg-inline-block d-md-inline-block d-sm-inline-block">
<table class="table">
 
                   <thead class="bg-card-table raunded">
                    <tr>
                        <th style="text-align: center;" scope="col" class="rounded-left"></th>
                        <th style="text-align: center;" scope="col">{{ column_model }}</th>
                        <th style="text-align: center;" scope="col">Наименование</th>
                        <th style="text-align: center;" scope="col">{{ column_price }}</th>
                        <th style="text-align: center;" scope="col">{{ column_quantity }}</th>
                        <th style="text-align: center;" scope="col">{{ column_total }}</th>
                        <th style="text-align: center;" scope="col" class="rounded-right">Удалить</th>
                    </tr>
                </thead>
             {% if products or vouchers %}
                    <tbody>
      {% for product in products %}
                <tr>
                <th style="text-align: center;" scope="row">1</th>
                  <td style="text-align: center;"  scope="row" >{{ product.model }}</td>
          <td  style="text-align: center;" class="name">{{ product.name }}{% if not product.stock %} <span class="text-danger">***</span> {% endif %}
                <td style="text-align: center;">{{ product.price }}</td>
                    {% if edit_cart %} 
                <td style="text-align: center;"  class="quantity">
                                 <div class="row">
                                      <div class="col-8 px-2">
                                         <div class="input-group input-group-sm">
                          
                                            <input type="text" data-mask="9?999999999999999" value="{{ product.quantity }}" class="qc-product-qantity form-control text-center" name="quantity[{{ product.key }}]">
 
                                         </div>
                                        </div>
                            <div class="col-2 px-0">
                            <span class="input-group-btn">
                                 <button class="btn btn-control btn-white border float-right  button-update" data-type="increase" data-product="{{ product.key }}">
                                     <span class="fas fa-chevron-up fa-increase"></span>     
                            </span>
                            <span class="input-group-btn">
                                <button class="btn btn-control btn-white border float-right button-update" data-type="decrease"  data-product="{{ product.key }}">
                                    <span class="fas fa-chevron-down fa-increase"></span>     
                                </button>    
                            </span>  
                            </div>
 
                        </div> 
                        
                        </div> 
                        
                        </div> 
        
                      
            {% else %}
            x&nbsp;{{ product.quantity }} 
            </div>
               
            {% endif %}</td>
            <td style="text-align: center;" class="total hidden-xs">{{ product.total }}</td>
                <td style="text-align: center;">
                    <button class="btn  button-remove" data-product="{{ product.key }}" data-remove="{{ product.key }}" title="{{ button_remove }}">
                        <svg width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18Z" fill="#D75A4A"/>
                        <path d="M5.76001 12.24L9.00001 9.00001L12.24 5.76001" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/>
                        <path d="M5.76001 5.76001L9.00001 9.00001L12.24 12.24" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/>
                        </svg>
                    </button>
                </td>
            </tr>
 
{% endfor %} 
{% endif %}
</tbody>
</table>
</div>
 
 <div class="mobile-table d-lg-none d-md-none d-sm-none mt-4">
         {% for product in products %}
                <table class="table table-borderless">
                
                  <tbody>
                    <tr>
                      <th scope="row" class="rounded-top"></th>
                      <td>1</td>
                    </tr>
                    <tr>
                      <th scope="row">{{ column_model }}</th>
                      <td>957397</td>
                    </tr>
                    <tr>
                      <th scope="row">Наименование</th>
                      <td>{{ product.name }}{% if not product.stock %} <span class="text-danger">***</span> {% endif %}</td>
                    </tr>
                    <tr>
                      <th scope="row">Цена</th>
                      <td>{{ product.price }}</td>
                    </tr>
                    <tr>
                      <th scope="row">Кол-во</th>
                {% if edit_cart %} 
                <td style="text-align: center;"  class="quantity">
                                 <div class="row">
                                      <div class="col-8 px-2">
                                         <div class="input-group input-group-sm">
                          
                                            <input type="text" data-mask="9?999999999999999" value="{{ product.quantity }}" class="qc-product-qantity form-control text-center" name="quantity[{{ product.key }}]">
 
                                         </div>
                                        </div>
                            <div class="col-2 px-0">
                            <span class="input-group-btn">
                                 <button class="btn btn-control btn-white border float-right  button-update" data-type="increase" data-product="{{ product.key }}">
                                     <span class="fas fa-chevron-up fa-increase"></span>     
                            </span>
                            <span class="input-group-btn">
                                <button class="btn btn-control btn-white border float-right button-update" data-type="decrease"  data-product="{{ product.key }}">
                                    <span class="fas fa-chevron-down fa-increase"></span>     
                                </button>    
                            </span>  
                            </div>
 
                        </div> 
                        
                        </div> 
                        
                        </div> 
        
                      
            {% else %}
            x&nbsp;{{ product.quantity }} 
            </div>
               
                    </tr>
                    <tr>
                      <th scope="row">Сумма</th>
                      <td>{{ product.price}}</td>
                    </tr>
                    <tr>
                      <th scope="row" class="rounded-bottom">Удалить</th>
                      
                      <td>
                        <button class="btn  button-remove" data-product="{{ product.key }}" data-remove="{{ product.key }}" title="{{ button_remove }}">
                        <svg width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18Z" fill="#D75A4A"/>
                        <path d="M5.76001 12.24L9.00001 9.00001L12.24 5.76001" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/>
                        <path d="M5.76001 5.76001L9.00001 9.00001L12.24 12.24" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/>
                        </svg>
                    </button>
                      </td>
                    </tr>
                  </tbody>
                </table>
                {% endif %}
               {% endfor %} 
            </div>
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.