Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-6711

CommerceVirtualOrderContentDisplayContext is not available in ADT for Product Downloads

Details

    Description

      Steps to reproduce:
      1. Create a new site with Minium
      2. Create a new Virtual Product in the Minimum catalog with a dummy PDF
      3. Open the Minium site administration panel
      4. Go to Build > Application Display Templates
      5. Create a new "Product Downloads Template"
      6. Add the following content (note that I used the proposed fields from the left panel):

      <#if commerceVirtualOrderContentDisplayContext??>
      <#if entries?has_content>
      <#list entries as curCommerceVitualOrderItem>
      ${commerceVirtualOrderContentDisplayContext.getDownloadResourceURL(curCommerceVitualOrderItem.commerceVirtualOrderItemId)}
      </#list>
      </#if>
      <#else>
      commerceVirtualOrderContentDisplayContext is missing or null
      </#if>

      7. Save it as "Custom Template"
      8. Go to the site
      9. Go to the Placed Orders page (/group/minium/placed-orders)
      10. Add the "Product Downloads" widget
      11. Go the "Product Downloads" widget configuration
      12. Change the "Display Template" to the newly created "Custom Template"
      13. Save and reload the page

      Actual result:
      The widget displays "commerceVirtualOrderContentDisplayContext is missing or null".

      Expected result:
      The widget displays the download URL for the dummy PDF associated to the new Virtual Product.

      Attachments

        Activity

          People

            kristin.onias Kristin Onias
            alec.sloan Alec Sloan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                7.4 DXP U2