@@ -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), | |||
]; | |||
} | |||
@@ -354,7 +354,7 @@ $this->setMeta('description', $producerModule->getSeoGenerator()->generateMetaDe | |||
<span v-if="product.weight">({{ product.weight }} 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"> |
@@ -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() { |