wip itemvariant
This commit is contained in:
@@ -55,14 +55,28 @@
|
||||
-->
|
||||
|
||||
<div>
|
||||
<input type="hidden" id="variant-name1" name="varian-name[]" value="B/W" required>
|
||||
<div class="flex items-center justify-between">
|
||||
<label for="price" class="block text-sm/6 font-medium text-gray-900">Price</label>
|
||||
<label for="variant-value1" class="block text-sm/6 font-medium text-gray-900">Price B/W</label>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<input type="number" name="price" id="price" step="0.01" min="0.00" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
||||
<input type="number" name="variant-value[]" id="variant-value1" step="0.01" min="0.00" required class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<input type="hidden" id="variant-name2" name="varian-name[]" value="Colored" required>
|
||||
<div class="flex items-center justify-between">
|
||||
<label for="variant-value2" class="block text-sm/6 font-medium text-gray-900">Price Colored</label>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<input type="number" name="variant-value[]" id="variant-value2" step="0.01" min="0.00" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-900">
|
||||
Image
|
||||
@@ -101,5 +115,40 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="/submit-product" method="POST">
|
||||
<label for="product-name">Product Name:</label>
|
||||
<input type="text" id="product-name" name="product-name" required><br><br>
|
||||
|
||||
<label for="product-type">Product Type:</label>
|
||||
<select id="product-type" name="product-type" required>
|
||||
<option value="magazine">Magazine</option>
|
||||
<option value="t-shirt">T-Shirt</option>
|
||||
</select><br><br>
|
||||
|
||||
<h3>Options</h3>
|
||||
<div class="option-group">
|
||||
<label for="option-name-1">Option Name:</label>
|
||||
<input type="text" id="option-name-1" name="option-name[]" required>
|
||||
<label for="option-price-1">Price:</label>
|
||||
<input type="number" id="option-price-1" name="option-price[]" required><br><br>
|
||||
</div>
|
||||
|
||||
<div class="option-group">
|
||||
<label for="option-name-2">Option Name:</label>
|
||||
<input type="text" id="option-name-2" name="option-name[]" required>
|
||||
<label for="option-price-2">Price:</label>
|
||||
<input type="number" id="option-price-2" name="option-price[]" required><br><br>
|
||||
</div>
|
||||
|
||||
<div class="option-group">
|
||||
<label for="option-name-3">Option Name:</label>
|
||||
<input type="text" id="option-name-3" name="option-name[]" required>
|
||||
<label for="option-price-3">Price:</label>
|
||||
<input type="number" id="option-price-3" name="option-price[]" required><br><br>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="Add Product">
|
||||
</form>
|
||||
|
||||
|
||||
{{ template "footer.html" . }}
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
{{ .data.shopItem.Abstract }}
|
||||
</p>
|
||||
<div class="flex mb-4">
|
||||
{{ range .data.shopItem.Variants }}
|
||||
<div class="mr-4">
|
||||
<span class="font-bold text-gray-700 dark:text-gray-300">Price:</span>
|
||||
<span class="text-gray-600 dark:text-gray-300">{{ .data.shopItem.Price }}€</span>
|
||||
<span class="font-bold text-gray-700 dark:text-gray-300">{{ .Name }}:</span>
|
||||
<span class="text-gray-600 dark:text-gray-300">{{ .Price }}€</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="flex mb-4">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</h3>
|
||||
<!--<p class="mt-1 text-sm text-gray-500">{{ .Abstract }}</p>-->
|
||||
</div>
|
||||
<p class="text-sm font-medium text-gray-900">{{ .Price }}€</p>
|
||||
<p class="text-sm font-medium text-gray-900">{{ .BasePrice }}€</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user