'option_delivery' => $producer->option_delivery, | 'option_delivery' => $producer->option_delivery, | ||||
'online_payment' => $producer->online_payment, | 'online_payment' => $producer->online_payment, | ||||
'option_online_payment_type' => $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), | |||||
]; | ]; | ||||
} | } | ||||
<span v-if="product.weight">({{ product.weight }} g)</span> | <span v-if="product.weight">({{ product.weight }} g)</span> | ||||
</span> | </span> | ||||
<div> | <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> | class="badge bg-danger">Épuisé</span> | ||||
</div> | </div> | ||||
<div class="description" v-if="product.description.length"> | <div class="description" v-if="product.description.length"> |
app.products = response.products; | app.products = response.products; | ||||
app.loadingProducts = false; | app.loadingProducts = false; | ||||
}, 'json'); | }, 'json'); | ||||
}.bind(this, app), 300); | |||||
}.bind(this, app), 500); | |||||
return; | return; | ||||
} | } | ||||
) { | ) { | ||||
var theQuantity = parseFloat(this.products[product.index].quantity_form) + parseFloat(quantity); | var theQuantity = parseFloat(this.products[product.index].quantity_form) + parseFloat(quantity); | ||||
this.products[product.index].quantity_form = parseFloat(theQuantity.toFixed(2)) ; | 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() { | oneProductOrdered: function() { |