First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
include "db.php";
|
||||
include "table.php";
|
||||
|
||||
$products = new Table("supplier_products");
|
||||
$hlmp = new Table("hotlunch_menu_products");
|
||||
|
||||
$school_num = 18452;
|
||||
$supplier_num = 4303;
|
||||
$product_type = 'Product';
|
||||
$status = 'Active';
|
||||
$package_qty = 1;
|
||||
$package_cost = 0.00;
|
||||
$taxable_product = 'N';
|
||||
$added_date = date("Y-m-d",time());
|
||||
$special_price1 = 0.00;
|
||||
$special_price2 = 0.00;
|
||||
$special_price3 = 0.00;
|
||||
$special_price4 = 0.00;
|
||||
$special_price5 = 0.00;
|
||||
$bc_guideline_rating = 'N/A';
|
||||
$min_options = 0;
|
||||
$max_options = 0;
|
||||
$min_options2 = 0;
|
||||
$max_options2 = 0;
|
||||
$min_options3 = 0;
|
||||
$max_options3 = 0;
|
||||
$source_product_num = 0;
|
||||
$sequence = 1;
|
||||
|
||||
db_query("DELETE FROM supplier_products WHERE school_num = $school_num");
|
||||
db_query("DELETE FROM hotlunch_menu_products WHERE school_num = $school_num");
|
||||
|
||||
$product_sequence = 1;
|
||||
$supplier_product_qty = 1;
|
||||
|
||||
$items = db_query("SELECT distinct item_title, label_title, item_description, label_title, online_price, offline_price, " .
|
||||
"options_title, options, default_options, min_options, max_options, " .
|
||||
"options2_title, options2, default_options2, min_options2, max_options2, " .
|
||||
"options3_title, options3, default_options3, min_options3, max_options3 " .
|
||||
"FROM hotlunch_menu_items " .
|
||||
"WHERE school_num = $school_num " .
|
||||
"AND item_type = 'Item' " .
|
||||
"AND active != 'N' " .
|
||||
"ORDER BY item_title");
|
||||
while ($row = db_fetch_assoc($items)) {
|
||||
extract($row);
|
||||
|
||||
$product_name = $item_title;
|
||||
$label_name = $label_title;
|
||||
$product_description = $item_description;
|
||||
$standard_online_price = $online_price;
|
||||
$standard_offline_price = $offline_price;
|
||||
|
||||
$product_options = $options;
|
||||
$product_options2 = $options2;
|
||||
$product_options3 = $options3;
|
||||
|
||||
$query = $products->BuildInsert();
|
||||
db_query($query);
|
||||
$supplier_product_num = db_insert_id();
|
||||
|
||||
$results = db_query("SELECT * FROM hotlunch_menu_items WHERE school_num = $school_num AND item_title = '$item_title' AND active != 'N'");
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
$menu_item_num = $row['record_num'];
|
||||
|
||||
$query = $hlmp->BuildInsert();
|
||||
db_query($query);
|
||||
}
|
||||
|
||||
$sequence++;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user