Index: openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql 9 Mar 2002 02:00:02 -0000 1.3 +++ openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql 26 May 2002 04:36:49 -0000 1.4 @@ -1,182 +1,139 @@ + - - - - select subject as email_subject, message as email_body, issue_type_list - from ec_email_templates - where email_template_id = 1 - - - + + + select subject as email_subject, message as email_body, issue_type_list + from ec_email_templates + where email_template_id = 1 + + - - - - + + select ep.email_on_purchase_list, ep.product_name from ec_items ei, ec_products ep where ei.product_id = ep.product_id and ei.order_id = :order_id group by ep.email_on_purchase_list, ep.product_name - - - + + - - - - - select u.email, u.user_id - from ec_orders, cc_users u - where ec_orders.user_id = u.user_id - and order_id = :order_id - - - + + + select u.email, u.user_id + from ec_orders, cc_users u + where ec_orders.user_id = u.user_id + and order_id = :order_id + + - - - - - select subject as email_subject, message as email_body, issue_type_list - from ec_email_templates - where email_template_id = 3 - - - + + + select subject as email_subject, message as email_body, issue_type_list + from ec_email_templates + where email_template_id = 3 + + - - - - - select u.email, u.user_id, s.shipment_date, s.address_id, o.order_state, o.order_id - from ec_orders o, cc_users u, ec_shipments s - where o.user_id = u.user_id - and o.order_id = s.order_id - and s.shipment_id = :shipment_id - - - + + + select u.email, u.user_id, s.shipment_date, s.address_id, o.order_state, o.order_id + from ec_orders o, cc_users u, ec_shipments s + where o.user_id = u.user_id + and o.order_id = s.order_id + and s.shipment_id = :shipment_id + + - - - - - select p.product_name, p.one_line_description, p.product_id, i.price_charged, i.price_name, count(*) as quantity - from ec_items i, ec_products p - where i.product_id=p.product_id - and i.shipment_id=:shipment_id - group by p.product_name, p.one_line_description, p.product_id, i.price_charged, i.price_name - - - + + + select p.product_name, p.one_line_description, p.product_id, i.price_charged, i.price_name, count(*) as quantity + from ec_items i, ec_products p + where i.product_id=p.product_id + and i.shipment_id=:shipment_id + group by p.product_name, p.one_line_description, p.product_id, i.price_charged, i.price_name + + - - - - - select subject as email_subject, message as email_body, issue_type_list - from ec_email_templates - where email_template_id = 2 - - - + + + select subject as email_subject, message as email_body, issue_type_list + from ec_email_templates + where email_template_id = 2 + + - - - - - select g.purchased_by as user_id, u.email, g.recipient_email, g.amount + + + select g.purchased_by as user_id, u.email, g.recipient_email, g.amount from ec_gift_certificates g, cc_users u - where g.purchased_by=u.user_id - and g.gift_certificate_id=:gift_certificate_id - - - + where g.purchased_by=u.user_id + and g.gift_certificate_id=:gift_certificate_id + + - - - - - select subject as email_subject, message as email_body, issue_type_list - from ec_email_templates - where email_template_id = 4 - - - + + + select subject as email_subject, message as email_body, issue_type_list + from ec_email_templates + where email_template_id = 4 + + - - - - - select g.purchased_by as user_id, u.email, g.recipient_email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message - from ec_gift_certificates g, cc_users u - where g.purchased_by=u.user_id - and g.gift_certificate_id=:gift_certificate_id - - - + + + select g.purchased_by as user_id, u.email, g.recipient_email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message + from ec_gift_certificates g, cc_users u + where g.purchased_by=u.user_id + and g.gift_certificate_id=:gift_certificate_id + + - - - - - select subject as email_subject, message as email_body, issue_type_list - from ec_email_templates - where email_template_id = 6 - - - + + + select subject as email_subject, message as email_body, issue_type_list + from ec_email_templates + where email_template_id = 6 + + - - - + + + select g.recipient_email as email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message, g.claim_check + from ec_gift_certificates g + where g.gift_certificate_id=:gift_certificate_id + + - select g.recipient_email as email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message, g.claim_check - from ec_gift_certificates g - where g.gift_certificate_id=:gift_certificate_id - - - - - - - + + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id=5 - - + + - - - - - select user_id + + + select user_id from cc_users - where email=lower(:email) - - - + where email=lower(:email) + + - - - + + select user_identification_id from ec_user_identification where email=lower(:email) - - + + - - - - - insert into ec_user_identification - (user_identification_id, email) - values - (:user_identification_id, :trimmed_email) - - - + + + insert into ec_user_identification + (user_identification_id, email) + values + (:user_identification_id, :trimmed_email) + + -