Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16109

shop/confirmorder doesn't support FETCH_TEMPLATE_REPEAT from workflow

    XMLWordPrintable

Details

    Description

      We are making a shipping handler that needs to ask the user which shipping option to use, and figured the obvious way was to make a workflow type for shop/confirmorder/before (like the eZSimpleShippingType class), that returned eZWorkflowType::STATUS_FETCH_TEMPLATE_REPEAT to show the questions and then be run again with the POSTed answers.

      However, this ends up showing an empty page to the user, because eZModuleOperationInfo then returns STATUS_REPEAT instead of STATUS_HALTED, which shop/confirmorder doesn't check for in its operationResult switch.

      Fix: add a new case statement right above the existing one(line 87) so that it looks like this:

          case eZModuleOperationInfo::STATUS_REPEAT:
          case eZModuleOperationInfo::STATUS_HALTED:
      

      A grep of eZP 4.1.4 shows that this status is only used within eZModuleOperationInfo, so I assume this is probably not the only place FETCH_TEMPLATE_REPEAT won't work because of this.

      Steps to reproduce

      Create a workflow type for shop/confirmorder/before that sets $process->Template and returns eZWorkflowType::STATUS_FETCH_TEMPLATE_REPEAT
      Set it up to run under triggers
      Go through checkout to shop/confirmorder

      Expected result: The template being fetched and shown to the user
      Actual results: An empty page, showing just the pagelayout with no content

      Attachments

        Activity

          People

            unknown unknown
            edorfaus edorfaus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: