Forum OpenACS Q&A: Ecommerce Pre Orders

Collapse
Posted by Hamilton Chua on
Hello,

I noticed that the ecommerce module has an allowpreorders parameter.
But when I checked product.tcl I noticed that the script only gets
the value of the parameter but does nothing else to allow pre orders.

Regards,

Collapse
Posted by Bart Teeuwisse on
Hamilton,

there are more 'features' in the eCommerce package that go unused because they are incomplete. To name a few:

  • the URL field of a product
  • the stock status of a product
  • additional supporting product files

Feel free to submit patches to the SDM.

/Bart

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.