Hi!

I am working on add/edit module for products on an e-commerce project.
Here requires to save multiple images at same time. While submitting
form the debug output for received ProductImage elements of $this-
>data is as below:
app\controllers\products_controller.php (line 716)

Array
(
    [1] => Array
        (
            [id] =>
            [product_image_category_id] => 2
            [file] => Array
                (
                    [name] => large.jpg
                    [type] => image/jpeg
                    [tmp_name] => D:/wamp/tmp\php311.tmp
                    [error] => 0
                    [size] => 50762
                )

            [image_file] => prodImage11240221425.jpg
            [site_admin_id] => 1
        )

    [0] => Array
        (
            [file] => Array
                (
                    [name] => small.jpeg
                    [type] => image/jpeg
                    [tmp_name] => D:/wamp/tmp\php310.tmp
                    [error] => 0
                    [size] => 10217
                )

            [image_file] => prodImage01240221425.jpeg
            [site_admin_id] => 1
            [product_image_category_id] => 1
        )

)

As the values for 'product_image_category_id' key are 2 and 1
respectively while 1 being ThumbNail and other being LargeImage. The
problem is that the
       $this->Product->saveAll($this->data, array('validate' =>
true));
is save all 'product_image_category_id' to 1.

Similar save occurs in the care of Product Variations where a drop-
down has Unit(s), Case(s) and Pack(s) as options. Even while I select
Case(s) [Id = 2] or Pack(s) [Id = 3], saveAll saves it to 1 i.e.
'product_package_type_id' having value 1.

Please help!

There is no clue for me as the debug array data just before save is
all correct to my knowledge.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to