Product image not showing in popup create view

I have added a product popup view and in that view i customize it to create a new product. by making formbase method.

Now i am successfully saving an populating a new product but the problem is there is field in product called product image. it is not showing in product create view and empty field is appearing in front of its label.

Further more i tried to also get the html by

$html = $productObj->display();
echo $html;

in html text the product image is empty. Any body can help in this regard?

What is that fields internal type, as seen in the vardefs?

1 Like

its varchar as

'product_image' =>
            'name' => 'product_image',
            'vname' => 'LBL_PRODUCT_IMAGE',
            'type' => 'varchar',
            'len' => '255',
            'reportable' => true,
            'comment' => 'File name associated with the note (attachment)'

I was hoping it was the correct SugarField type for images, but no, it seems to be handled differently.

Have a look at this, it will help you understand how it’s handled in other places.


For example, this

yeah i have seen but it is in the quick create view not in the detail view.

The quickcreatedefs are in the same directory.

What I meant is that you can apply the logic that works in one place to the other place. Perhaps all you need to do is change the customCode here to look the same as in the Detail view:

thank you for your reply i want to ask i have to modify the β€˜view.quickcreate’ file?

Have you tried modifying modules/AOS_Products/metadata/quickcreatedefs.php#L109? What happened?

yeah i tried but no success i thing the problem is it is not getting the variable {$PRODUCT_IMAGE}

Can you use a debugger to break when loading the view, and checking the assignments before entering the tpl?

yeah sure i will do that and if i cam upon any success i will update here