Forum OpenACS Q&A: ecommerce ec_products present_p

Collapse
Posted by Torben Brosten on
present_p from ec_products is defined as:

boolean | default ('t')

When adding products one by one[1], present_p defaults to 't'  (at least because of radio button settings within the add-product form[1]) as the user expects.

With bulk uploading products (/admin/products/upload), my experience is that present_p values remain null so that none of the uploaded products are shown in the shopping basket. =(

I do not include present_p in the products data uploaded.

Is this standard/expected behavior?

Collapse
Posted by Torben Brosten on
missing from above:

1. /ecommerce/www/admin/products/add*

It looks like present_p is explicitly referenced during the insert[2], and thus empty is null.

I guess, there should be a check for null and replace with 't' before inserting products.

2. /ecommerce/www/admin/products/upload

Collapse
Posted by Torben Brosten on