Created
October 20, 2015 11:53
-
-
Save vgrish/e2151f3949f5dd1333f6 to your computer and use it in GitHub Desktop.
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 | |
/* @var miniShop2 $miniShop2 */ | |
$miniShop2 = $modx->getService('minishop2'); | |
$miniShop2->initialize($modx->context->key); | |
$cart = $miniShop2->cart->status(); | |
$cart['total_cost'] = $miniShop2->formatPrice($cart['total_cost']); | |
$cart['total_weight'] = $miniShop2->formatWeight($cart['total_weight']); | |
$cart['total_my_count'] = count(array_count_values(array_values(array_map('array_shift',$_SESSION['minishop2']['cart'])))) | |
return !empty($tpl) ? $modx->getChunk($tpl, $cart) : print_r($cart,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment