Created
October 20, 2017 09:27
-
-
Save sashabeep/8695f67efe59090f434ff58ec9c72cc9 to your computer and use it in GitHub Desktop.
prepare snippet for EvoShop orders view module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content = $data['content']; | |
$itemsArr = json_decode($content, true); | |
foreach($itemsArr as $k => $v){ | |
$evoShopItems .='<li><b><a target="_blank" href='.$modx->config['site_url'].$v['link'].'>'.$v['name'].'</a></b> x '.$v['quantity'].' шт, <b>'.$v['price'].'</b> руб</li>'; | |
$total = $total + ($v['quantity']*$v['price']); | |
} | |
$evoShopItems .= '</ul>'; | |
$data['orderdata'] = $evoShopItems; | |
return serialize($data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment