function get_cart_count in GlobalLink Connect for Drupal 7.7
16 calls to get_cart_count()
- globallink_beans_dashboard_form in globallink_beans/
globallink_beans_send.inc - Builds form to create a beans submission.
- globallink_block_dashboard_form in globallink_block/
globallink_block_send.inc - Builds form to create a block submission.
- globallink_commerce_dashboard_form in globallink_commerce/
globallink_commerce_send.inc - Builds form to create a commerce submission.
- globallink_create_submission_form in ./
globallink_send_translations.inc - globallink_create_submission_form_validate in ./
globallink_send_translations.inc - Validates form actions for GlobalLink submissions.
File
- ./
globallink.inc, line 1201 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function get_cart_count() {
$count = 0;
if (isset($_SESSION['nids'])) {
$count += count($_SESSION['nids']);
}
if (isset($_SESSION['eids'])) {
$count += count($_SESSION['eids']);
}
if (isset($_SESSION['bids'])) {
$count += count($_SESSION['bids']);
}
if (isset($_SESSION['fpids'])) {
$count += count($_SESSION['fpids']);
}
if (isset($_SESSION['int_ids'])) {
$count += count($_SESSION['int_ids']);
}
if (isset($_SESSION['mids'])) {
$count += count($_SESSION['mids']);
}
if (isset($_SESSION['tids'])) {
$count += count($_SESSION['tids']);
}
if (isset($_SESSION['wfids'])) {
$count += count($_SESSION['wfids']);
}
if (isset($_SESSION['bnids'])) {
$count += count($_SESSION['bnids']);
}
if (isset($_SESSION['fids'])) {
$count += count($_SESSION['fids']);
}
if (isset($_SESSION['pids'])) {
$count += count($_SESSION['pids']);
}
return $count;
}