Index: openacs-4/packages/ecommerce/www/admin/products/add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/add-2.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/ecommerce/www/admin/products/add-2.tcl 14 Aug 2008 09:47:43 -0000 1.9 +++ openacs-4/packages/ecommerce/www/admin/products/add-2.tcl 28 Aug 2008 22:27:57 -0000 1.10 @@ -27,7 +27,7 @@ weight stock_status user_class_prices:array,optional - categorization:multiple + {categorization:multiple ""} available_date:array,date upload_file:optional upload_file.tmpfile:optional @@ -151,16 +151,16 @@ # copy image & create thumbnails # thumbnails are all jpg files - ecommerce::resource::make_product_images \ + set dirname [ecommerce::resource::make_product_images \ -file_extension [file extension $upload_file] \ -product_id $product_id \ -product_name $product_name \ - -tmp_filename ${upload_file.tmpfile} + -tmp_filename ${upload_file.tmpfile} ] } - -set dirname [ecommerce::resource::dirname -product_id $product_id -product_name $product_name] - +if { [string length $dirname] < 2 } { + set dirname [ecommerce::resource::dirname -product_id $product_id -product_name $product_name] +} # TODO: improve, along with admin add product pages set linked_thumbnail [ecommerce::resource::image_tag -type Thumbnail -product_id $product_id -product_name $product_name] Index: openacs-4/packages/ecommerce/www/admin/products/add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/add-3.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/www/admin/products/add-3.tcl 14 Aug 2008 09:47:43 -0000 1.6 +++ openacs-4/packages/ecommerce/www/admin/products/add-3.tcl 28 Aug 2008 22:27:57 -0000 1.7 @@ -58,8 +58,12 @@ set currency [parameter::get -package_id [ec_id] -parameter Currency] set multiple_retailers_p [parameter::get -package_id [ec_id] -parameter MultipleRetailersPerProductP -default f] -set categorization_html [ec_category_subcategory_and_subsubcategory_display $category_id_list $subcategory_id_list $subsubcategory_id_list] +set dirname [ecommerce::resource::dirname -product_id $product_id -product_name $product_name] +if { [string length $linked_thumbnail] < 5} { + set linked_thumbnail [ec_linked_thumbnail_if_it_exists $dirname] +} +set categorization_html [ec_category_subcategory_and_subsubcategory_display $category_id_list $subcategory_id_list $subsubcategory_id_list] if { !$multiple_retailers_p } { if { ![empty_string_p $stock_status] } { set stock_status_html [util_memoize "ad_parameter -package_id [ec_id] \"StockMessage[string toupper $stock_status]\"" [ec_cache_refresh]]