Subsequent delivery


131
Import SQL statement into the DB - PhpMyAdmin:
INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`)
VALUES ('Subsequent delivery if stock level is 0 ', 'ADDITIONAL_DELIVERY_DATA', 'approx. 14 days', 'Enter the period in days in which a subsequent delivery will be made for products that are not available in stock.', 1, 51, now(), now(), '', '');

Add in: catalog/includes/languages/english.php

define('ADDITIONAL_DELIVERY_INFO','Additional delivery:');
define('ADDITIONAL_DELIVERY_INFO_DAYS','days');

Add in: catalog/user.css

.pls_basePrice{font-family:Verdana, Arial, sans-serif;font-size:10px;color:#000000;white-space:nowrap;}

Find in: catalog/product_info.php

  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

Add after:

if (ADDITIONAL_DELIVERY_DATA >= ' ') {
$additional_delivery = '<span class="pls_basePrice">[ ' . ADDITIONAL_DELIVERY_INFO . '&nbsp;' . ADDITIONAL_DELIVERY_DATA . '&nbsp;' . ADDITIONAL_DELIVERY_INFO_DAYS . ' ]<br>'. '</span>';
}

Wherever you want to display the subsequent delivery output, paste the following:

<?php if ($product_info['products_quantity'] == '0') { echo $additional_delivery;} ?>

In the configuration in the administration area, your new option for subsequent delivery is now available to switch on and off.


w3c-Commerce
w3c-Commerce Downloads
  w3c-Commerce Add-ons php8