commit before consolodating payment methods
This commit is contained in:
@@ -478,10 +478,29 @@
|
||||
<a href="{{ route('cart') }}" class="btn btn--secondary" style="flex: 1; text-align: center;">View Cart</a>
|
||||
</div>
|
||||
<div class="btn-group " style="margin-top: 1rem; gap: 1rem;">
|
||||
<button class="btn btn--secondary" style="flex: 1;">Order Sample</button>
|
||||
<button type="button" class="btn btn--secondary" style="flex: 1;" onclick="orderSample()">Order Sample</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Sample Order Form (Hidden) -->
|
||||
<form id="sampleForm" action="{{ route('order-sample', $product) }}" method="POST" style="display: none;">
|
||||
@csrf
|
||||
<input type="hidden" name="print_stock_id" id="sampleStockId">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function orderSample() {
|
||||
const stockSelect = document.getElementById('print_stock_id');
|
||||
if (!stockSelect.value) {
|
||||
alert('Please select a stock option before ordering a sample.');
|
||||
stockSelect.focus();
|
||||
return;
|
||||
}
|
||||
document.getElementById('sampleStockId').value = stockSelect.value;
|
||||
document.getElementById('sampleForm').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const productType = 'wallpaper' === 'wallpaper' ? 'wallpaper' : 'mural';
|
||||
const basePrice = {{ $product->price }};
|
||||
|
||||
Reference in New Issue
Block a user