Skip to content
Permalink
Browse files

Added ID and ORDER_PRODUCT_ID to loop results

  • Loading branch information...
Franck Allimant
Franck Allimant committed Oct 6, 2019
1 parent 27079ab commit bce348f04b30874b5e80db3daf47a8cf6f27ff87
Showing with 12 additions and 10 deletions.
  1. +12 −10 core/lib/Thelia/Core/Template/Loop/OrderProductAttributeCombination.php
@@ -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;
}
@@ -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);

0 comments on commit bce348f

Please sign in to comment.
You can’t perform that action at this time.