vtws_describe of products not quite right?
As part of the result of the above call I see:
` [29] => Array ( [name] => imagename [label] => Product Image [mandatory] => [type] => Array ( [name] => string )
[isunique] =>
[nullable] => 1
[editable] => 1
[default] =>
)
`
But a product can have multiple images... So my question is, how, using the server API, do I identify information about a product's images?
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Contributor
As a follow up - in vtiger open source there is no equivalent to https://www.vtiger.com/docs/rest-api-for-vtiger#/Files_Retrieve so there is no way to use the server api to retrieve attachments of any type. For a Marketplace module how would this requirement be satisfied?
- Uma mentioned in merge request !598 (merged)
mentioned in merge request !598 (merged)
@lord_alan Please do review this, We have now supported to retrieve the attachment details of a record.
- Contributor
@uma.s You missed the file
include/Webservices/FileRetrieve.php
- Uma mentioned in merge request !604 (merged)
mentioned in merge request !604 (merged)
@manuelgit Thanks! for the note, Committed the file now.
- Author Contributor
@uma.s Great, thanks!
Now all we need is support of file upload over the Server/Webservices API too ;-)
@lord_alan Let me review this requirement in sometime soon.
- Author Contributor
@uma.s I installed a new vt from master yesterday. vtws_describe in a Product or a Contact still tells my code nothing interesting about these fields... How do I know it's an image field, the output of vtws_describe is exactly the same is it is for most other normal fields?
[name] => imagename [label] => Contact Image [mandatory] => [type] => Array ( [name] => string ) [isunique] => [nullable] => 1 [editable] => 1 [default] =>
A reference field, for example is described quite differently:
[name] => potential_id [label] => Opportunity Name [mandatory] => [type] => Array ( [refersTo] => Array ( [0] => Potentials ) [name] => reference ) [isunique] =>
An image field is more like a reference than a plain string...
- Uma mentioned in merge request !612 (merged)
mentioned in merge request !612 (merged)
@lord_alan Addressed! Will be passing type name as 'image' Ref
- Uma Milestone changed to 7.3
Milestone changed to 7.3
- Uma Added enhancement label
Added enhancement label
- Uma Added Webservice label
Added Webservice label
- Alan Lord Status changed to reopened
Status changed to reopened
- Author Contributor
This still seems a bit broken.
If I retrieve a Product from a Quote and then call vtws_file_retrieve with the imageattachmentids value, the data I get back is not useful at all.
[0] => Array ( [fileid] => 1070 [filename] => 00001486.jpg [filetype] => image/jpeg [filesize] => [filecontents] => )
How am I supposed to retrieve the actual file contents? Suppose I want to retrieve an image from a product and use/display that image in another way in a vtiger Marketplace approved module?
- Author Contributor
@uma.s I have made a comment on your merge request !598 (merged) there is an error in the Webservices utils function vtws_filedetails().
@lord_alan I will review this.
@lord_alan Thank you! Addressed here Ref
- Uma Status changed to closed
Status changed to closed