Index: openacs-4/packages/ecommerce/www/admin/products/upload-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/upload-2-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/products/upload-2-postgresql.xql 10 Jul 2001 20:33:53 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/products/upload-2-postgresql.xql 24 Nov 2001 03:36:39 -0000 1.2 @@ -1,13 +1,92 @@ - postgresql7.1 + postgresql7.1 - - - insert into ec_custom_product_field_values (product_id, last_modified, last_modifying_user, modified_ip_address) values (:val_$product_id_column, current_timestamp, :user_id, :peeraddr) - - + + + select product_id from ec_products + where sku = :sku; + + - + + + update ec_products set + last_modifying_user = :user_id, + product_name = :product_name, + price = :price, + one_line_description = :one_line_description, + detailed_description = :detailed_description, + search_keywords = :search_keywords, + present_p = :present_p, + stock_status = :stock_status, + last_modified = now(), + color_list = :color_list, + size_list = :size_list, + style_list = :style_list, + email_on_purchase_list = :email_on_purchase_list, + url = :url, + no_shipping_avail_p = :no_shipping_avail_p, + shipping = :shipping, + shipping_additional = :shipping_additional, + weight = :weight, + active_p = 't', + template_id = :template_id + where product_id = :product_id; + + + + + + select ec_product__new( + :product_id, + :user_id, + :context_id, + :product_name, + :price, + :sku, + :one_line_description, + :detailed_description, + :search_keywords, + :present_p, + :stock_status, + :dirname, + now(), + :color_list, + :size_list, + :peeraddr + ); + + + + + + update ec_products set style_list = :style_list, + email_on_purchase_list = :email_on_purchase_list, + url = :url, + no_shipping_avail_p = :no_shipping_avail_p, + shipping = :shipping, + shipping_additional = :shipping_additional, + weight = :weight, + active_p = 't', + template_id = :template_id + where product_id = :product_id; + + + + + + insert into ec_custom_product_field_values ( + product_id, + last_modified, + last_modifying_user, + modified_ip_address) values + (:val_$product_id_column, + now(), + :user_id, + :peeraddr) + + +