Sfoglia il codice sorgente

[Boutique] Commander : désactivation de la mise à jour automatique des quantités produits si le module accessoire n'est pas activé

develop
Guillaume Bourgeois 4 mesi fa
parent
commit
a9dc06335b
3 ha cambiato i file con 8 aggiunte e 4 eliminazioni
  1. +2
    -1
      producer/controllers/OrderController.php
  2. +1
    -1
      producer/views/order/order.php
  3. +5
    -2
      producer/web/js/vuejs/order-order.js

+ 2
- 1
producer/controllers/OrderController.php Vedi File

@@ -688,7 +688,8 @@ class OrderController extends ProducerBaseController
'option_delivery' => $producer->option_delivery,
'online_payment' => $producer->online_payment,
'option_online_payment_type' => $producer->online_payment,
'has_specific_delays' => $this->getProducerModule()->getSolver()->hasSpecificDelays($producer)
'has_specific_delays' => $this->getProducerModule()->getSolver()->hasSpecificDelays($producer),
'feature_product_accessory_enabled' => $this->getFeatureModule()->getChecker()->isEnabled(Feature::ALIAS_PRODUCT_ACCESSORY),
];
}


+ 1
- 1
producer/views/order/order.php Vedi File

@@ -354,7 +354,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe
<span v-if="product.weight">({{ product.weight }}&nbsp;g)</span>
</span>
<div>
<span v-if="product.quantity_max != null && (product.quantity_remaining <= 0 || product.quantity_remaining * product.coefficient_unit < product.step)"
<span v-if="product.quantity_max != null && (product.quantity_remaining <= 0 || product.quantity_remaining * product.coefficient_unit < product.step || product.quantity_form >= product.quantity_max * product.coefficient_unit)"
class="badge bg-danger">Épuisé</span>
</div>
<div class="description" v-if="product.description.length">

+ 5
- 2
producer/web/js/vuejs/order-order.js Vedi File

@@ -151,7 +151,7 @@ var app = new Vue({
app.products = response.products;
app.loadingProducts = false;
}, 'json');
}.bind(this, app), 300);
}.bind(this, app), 500);

return;
}
@@ -531,7 +531,10 @@ var app = new Vue({
) {
var theQuantity = parseFloat(this.products[product.index].quantity_form) + parseFloat(quantity);
this.products[product.index].quantity_form = parseFloat(theQuantity.toFixed(2)) ;
this.init('first', true);

if(this.producer.feature_product_accessory_enabled) {
this.init('first', true);
}
}
},
oneProductOrdered: function() {

Loading…
Annulla
Salva