Skip to content

Commit

Permalink
Merge pull request #2696 from roadster31/fix-OrderProductAttributeCom…
Browse files Browse the repository at this point in the history
…binationLoop

Add ID and ORDER_PRODUCT_ID to order_product_attribute_combination loop
  • Loading branch information
roadster31 committed Oct 7, 2019
2 parents 27079ab + bce348f commit 7ebcb5f
Showing 1 changed file with 12 additions and 10 deletions.
Expand Up @@ -70,10 +70,10 @@ public function buildModelCriteria()

foreach ($orders as $order) {
switch ($order) {
case "alpha":
case 'alpha':
$search->orderByAttributeTitle(Criteria::ASC);
break;
case "alpha_reverse":
case 'alpha_reverse':
$search->orderByAttributeTitle(Criteria::DESC);
break;
}
Expand All @@ -89,14 +89,16 @@ public function parseResults(LoopResult $loopResult)
$loopResultRow = new LoopResultRow($orderAttributeCombination);

$loopResultRow
->set("ATTRIBUTE_TITLE", $orderAttributeCombination->getAttributeTitle())
->set("ATTRIBUTE_CHAPO", $orderAttributeCombination->getAttributeChapo())
->set("ATTRIBUTE_DESCRIPTION", $orderAttributeCombination->getAttributeDescription())
->set("ATTRIBUTE_POSTSCRIPTUM", $orderAttributeCombination->getAttributePostscriptum())
->set("ATTRIBUTE_AVAILABILITY_TITLE", $orderAttributeCombination->getAttributeAvTitle())
->set("ATTRIBUTE_AVAILABILITY_CHAPO", $orderAttributeCombination->getAttributeAvChapo())
->set("ATTRIBUTE_AVAILABILITY_DESCRIPTION", $orderAttributeCombination->getAttributeAvDescription())
->set("ATTRIBUTE_AVAILABILITY_POSTSCRIPTUM", $orderAttributeCombination->getAttributeAvPostscriptum())
->set('ID', $orderAttributeCombination->getId())
->set('ORDER_PRODUCT_ID', $orderAttributeCombination->getOrderProductId())
->set('ATTRIBUTE_TITLE', $orderAttributeCombination->getAttributeTitle())
->set('ATTRIBUTE_CHAPO', $orderAttributeCombination->getAttributeChapo())
->set('ATTRIBUTE_DESCRIPTION', $orderAttributeCombination->getAttributeDescription())
->set('ATTRIBUTE_POSTSCRIPTUM', $orderAttributeCombination->getAttributePostscriptum())
->set('ATTRIBUTE_AVAILABILITY_TITLE', $orderAttributeCombination->getAttributeAvTitle())
->set('ATTRIBUTE_AVAILABILITY_CHAPO', $orderAttributeCombination->getAttributeAvChapo())
->set('ATTRIBUTE_AVAILABILITY_DESCRIPTION', $orderAttributeCombination->getAttributeAvDescription())
->set('ATTRIBUTE_AVAILABILITY_POSTSCRIPTUM', $orderAttributeCombination->getAttributeAvPostscriptum())
;
$this->addOutputFields($loopResultRow, $orderAttributeCombination);

Expand Down

0 comments on commit 7ebcb5f

Please sign in to comment.