Forum OpenACS Q&A: Response to Ecommerce Pre Orders

Collapse
Posted by Hamilton Chua on
I will have to correct myself. Looks like pre-order is working. The problem is the ec_add_to_cart_link proc.

This query :

set available_date [db_string available_date_select "select to_char(available_date,'Month DD, YYYY') available_date from ec_products  where product_id = :product_id"]

Should be :

set available_date [db_string available_date_select "select to_char(available_date,'Month DD, YYYY') as available_date from ec_products  where product_id = :product_id"]

NOTE : that the first query is missing an "as" before aviailble_date.

This fixed the proc and now shows a "Pre-Order Now" button in the product page when Pre-orders are enabled in the ecommerce parameters.