| 1 | <?php
|
|---|
| 2 | /*************************************************************
|
|---|
| 3 | * file: pr_set_shipping_time.php
|
|---|
| 4 | * path: /includes/extra/checkout/checkout_process_products/
|
|---|
| 5 | * use: set shipping time depending on stock
|
|---|
| 6 | *
|
|---|
| 7 | * Vorschlag von noRiddle 05-2020
|
|---|
| 8 | *************************************************************/
|
|---|
| 9 |
|
|---|
| 10 | //config
|
|---|
| 11 | $which_stock_limit = 0; //ab welchem Bestand Lieferzeit erhöhen ?
|
|---|
| 12 | $which_shipping_time_id = 2; //welche Lieferzeit-ID soll gesetzt werden wenn obiger Bestand erreicht ist ?
|
|---|
| 13 |
|
|---|
| 14 | if(STOCK_LIMITED == 'true') {
|
|---|
| 15 | if($stock_left <= $which_stock_limit) {
|
|---|
| 16 | xtc_db_query("UPDATE ".TABLE_PRODUCTS."
|
|---|
| 17 | SET products_shipping_time = ".$which_shipping_time_id."
|
|---|
| 18 | WHERE products_id = ".(int)xtc_get_prid($order->products[$i]['id']));
|
|---|
| 19 | }
|
|---|
| 20 | }
|
|---|
| 21 | ?>
|
|---|