Files
marianek.pl/admin/templates/baselinker/bundling-products.php
2024-10-25 23:02:37 +02:00

33 lines
1.3 KiB
PHP

<form method="POST" action="/admin/baselinker/bundling_products_save/">
<table class="table mbn table-hover table-striped table-bordered">
<thead>
<tr>
<th>Nazwa produktu</th>
<th>SKU</th>
<th>Produkt w Baselinker</th>
</tr>
</thead>
<tbody>
<? foreach ( $this -> products as $product ):?>
<tr>
<td><?= $product['name'];?> - <?= $product['id'];?></td>
<td><?= $product['sku'];?></td>
<td>
<select class="form-control" name="product_<?= $product['id'];?>">
<option value="">--- wybierz produkt ---</option>
<? foreach ( $this -> baselinker_products as $product_baselinker ):?>
<option value="<?= $product_baselinker['product_id'];?>"
<? if ( $product_baselinker['product_id'] == $product['baselinker_product_id'] or ( $product['sku'] == $product_baselinker['sku'] and $product['sku'] != "" ) ):?>selected="selected"<? endif;?>
>
<?= $product_baselinker['name'] . ' - ' . $product_baselinker['sku'];?>
<? endforeach;?>
</select>
</td>
</tr>
<? endforeach;?>
</tbody>
</table>
<button class="btn btn-success btn-sm">
<i class="fa fa-check-circle mr5"></i>Zapisz
</button>
</form>