Skip to content

Order total shipping class errors when product are virtuals #660

@tgely

Description

@tgely

if (strpos($_SESSION['shipping']['id'], '\\') !== false) {
list($vendor, $app, $module) = explode('\\', $_SESSION['shipping']['id']);
list($module, $method) = explode('_', $module);
$module = $vendor . '\\' . $app . '\\' . $module;
$code = 'Shipping_' . str_replace('\\', '_', $module);
if (Registry::exists($code)) {
$OSCOM_SM = Registry::get($code);
}
} else {
list($module, $method) = explode('_', $_SESSION['shipping']['id']);
if (is_object($GLOBALS[$module])) {
$OSCOM_SM = $GLOBALS[$module];
}
}

PHP Notice:  Undefined offset: 1 in \includes\modules\order_total\ot_shipping.php on line 60
PHP Stack trace:
PHP   1. {main}() \checkout_confirmation.php:0
PHP   2. order_total->process() \checkout_confirmation.php:96
PHP   3. ot_shipping->process() \includes\classes\order_total.php:54
PHP Notice:  Undefined index:  in \includes\modules\order_total\ot_shipping.php on line 62
PHP Stack trace:
PHP   1. {main}() \website\checkout_confirmation.php:0
PHP   2. order_total->process() \website\checkout_confirmation.php:96
PHP   3. ot_shipping->process() \website\includes\classes\order_total.php:54

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions