• Resolved demvdv

    (@demvdv)


    I’m currently trying to implement a product overview into a WordPress website using the Alexa CRM plug-in. At this moment I am a bit lost on how to correctly fetch images from PowerPhoto and display them on the website.

    Below is an example of the code, which currently isn’t working:

    [msdyncrm_twig]
    
    {% fetchxml collection="product" cache="PT30M" %}
        <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
            <entity name="product">
                <attribute name="productnumber"/>
    
                <filter type="and">
                    <condition attribute="statecode" operator="eq" value="0"/>
                </filter>
    
    ????        <link-entity name="product" from="productid" to="{po_oid}" alias="ac">
    ???           <attribute name="po_defaultimage" />
    
                  <filter type="and">
                    <condition attribute="productid" operator="eq" value="{{productid}}" />
        ?????     </filter>
        ???     </link-entity>
            </entity>
        </fetch>
    {% endfetchxml %}
    
        {% for product in product.results.entities %}
            <img src="'data:image;base64,{{ product.po_defaultimage }}');" />
        {% endfor %}
    
    [/msdyncrm_twig]
    

    Could someone help me out and show me how to correctly fetch images from PowerPhoto and display them on the website? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author alexacrm

    (@alexacrm)

    @demvdv

    not sure about to="{po_oid}" part – why curly brackets?

    I don’t know how PowerPhoto stores the images and can’t comment on how would you extract the binary. In any case, take a look at AnnotationImage.php in the source – that’s how we add msdyncrm_image action to provide a URL for an image/file stored as a standard annotation.

    Thanks
    George

    Plugin Author alexacrm

    (@alexacrm)

    Actually, we used to have a custom image implementation in CustomImage.php but the use was low so the settings were taken out of the admin UI. You can still adapt that code for your use by providing plugin options in code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with accessing PowerPhoto photo’s’ is closed to new replies.