-
-
Save CrazyBoy49z/8fa97487f8856cbd9158c2823087b783 to your computer and use it in GitHub Desktop.
This file contains hidden or 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