Back to PhocacartTime class

Method getOpeningTimesMessage

public static
getOpeningTimesMessage
()

Method getOpeningTimesMessage - Source code

public static function getOpeningTimesMessage()
{
    $paramsC = PhocacartUtils::getComponentParameters();
    $checking_opening_times = $paramsC->get('checking_opening_times', 0);
    $store_closed_checkout_message = $paramsC->get('store_closed_checkout_message', 0);
    $orderAllowed = false;
    // As default ==> 2 Order not possible when closed
    if ($checking_opening_times == 0) {
        return '';
    } else {
        if ($checking_opening_times == 1) {
            $orderAllowed = true;
        }
    }
    if ($orderAllowed) {
        return PhocacartRenderFront::renderArticle((int) $store_closed_checkout_message, 'html', Text::_('COM_PHOCACART_SHOP_IS_NOT_CURRENTLY_OPEN'));
    }
}