checks if the current shipping type is available for the current basket
affected articles in the basket will be marked with the shipping type.

@return bool
186181
public function IsValidForBasket()
    {
        $bValidForBasket = false;
        $oArticles = &$this->GetAffectedBasketArticles();
        $bValidForBasket = ($oArticles->Length() > 0);

        return $bValidForBasket;
    }
447145
public function isShipped( $strict = true ) {

		if( $strict ) {

			return $this->status == self::STATUS_SHIPPED;
		}

		return $this->status >= self::STATUS_SHIPPED;
	}
249158
public function isPayPalCheckValid()
    {
        $newBasketAmount = $this->getNewBasketAmount();
        $prevBasketAmount = $this->getOldBasketAmount();
        // check only if new price is different and bigger than old price
        if ($newBasketAmount > $prevBasketAmount) {
            return false;
        }

        return true;
    }
952264
public function isEmbargoed()
    {
        if (is_object($this->EmbargoedUntilDate)) {
            $this->EmbargoedUntilDate = $this->EmbargoedUntilDate->Value;
        }

        $embargoed = false;

        if ($this->EmbargoedIndefinitely) {
            $embargoed = true;
        } elseif ($this->EmbargoedUntilPublished) {
            $embargoed = true;
        } elseif (!empty($this->EmbargoedUntilDate)) {
            if (SS_Datetime::now()->Value < $this->EmbargoedUntilDate) {
                $embargoed = true;
            }
        }

        return $embargoed;
    }
1066311
public function canResetShippingDate()
    {
        $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
        $blCan = false;
        if ($oOrder->load($this->getEditObjectId())) {
            $blCan = $oOrder->oxorder__oxstorno->value == "0" &&
                     !($oOrder->oxorder__oxsenddate->value == "0000-00-00 00:00:00" || $oOrder->oxorder__oxsenddate->value == "-");
        }

        return $blCan;
    }
818299
public function HasBasketRestrictions()
    {
        $bRestrictedToBasket = (($this->fieldRestrictToArticlesFrom > 0) || ($this->fieldRestrictToArticlesTo > 0) || ($this->fieldRestrictToValueFrom > 0) || ($this->fieldRestrictToValueTo > 0));

        return $bRestrictedToBasket;
    }
319937
public function valid()
    {

        if ($this->container['typeId'] === null) {
            return false;
        }
        if ($this->container['quantity'] === null) {
            return false;
        }
        if ($this->container['locationId'] === null) {
            return false;
        }
        if ($this->container['locationType'] === null) {
            return false;
        }
        $allowedValues = $this->getLocationTypeAllowableValues();
        if (!in_array($this->container['locationType'], $allowedValues)) {
            return false;
        }
        if ($this->container['itemId'] === null) {
            return false;
        }
        if ($this->container['locationFlag'] === null) {
            return false;
        }
        $allowedValues = $this->getLocationFlagAllowableValues();
        if (!in_array($this->container['locationFlag'], $allowedValues)) {
            return false;
        }
        if ($this->container['isSingleton'] === null) {
            return false;
        }
        return true;
    }
1144494
public function hasOutOfStockArticles()
    {
        $result = false;

        $basketContents = $this->getBasket()->getContents();

        foreach ($basketContents as $basketItem) {
            $article = $basketItem->getArticle();
            if (($article->getStockAmount() - $basketItem->getAmount()) < $this->getEmptyStockLevel()) {
                $result = true;
                break;
            }
        }

        return $result;
    }
643248
public function isDownloadableProductWarning()
    {
        $basket = $this->getSession()->getBasket();
        if ($basket && \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam("blEnableDownloads")) {
            if ($basket->hasDownloadableProducts()) {
                return true;
            }
        }

        return false;
    }
830403
public function IsBuyable()
    {
        $bIsBuyable = &$this->GetFromInternalCache('bIsBuyable');
        if (is_null($bIsBuyable)) {
            $bIsBuyable = $this->isActive();
            if ($bIsBuyable) {
                $oShopConfig = TdbShop::GetInstance();

                if (isset($oShopConfig->fieldAllowPurchaseOfVariantParents) &&
                    !$oShopConfig->fieldAllowPurchaseOfVariantParents &&
                    ($this->HasVariants() || ('' != $this->fieldShopVariantSetId && false === $this->IsVariant()))) {
                    $bIsBuyable = false;
                }
            }
            $this->SetInternalCache('bIsBuyable', $bIsBuyable);
        }

        return $bIsBuyable;
    }
490745
public function isNewItemAdded()
    {
        if ($this->_blNewITemAdded == null) {
            $this->_blNewITemAdded = (bool) \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("blAddedNewItem");
            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("blAddedNewItem");
        }

        return $this->_blNewITemAdded;
    }
374602
public function isSortedByGeoDistance(): bool
    {
        foreach ($this->sortsBy as $sortBy) {
            if (self::TYPE_DISTANCE === $sortBy['type']) {
                return true;
            }
        }

        return false;
    }
23358
public function has_items() {
        if ($this->duringinstall) {
            return false;
        } else if ($this->hasitems !== false) {
            return true;
        }
        if (count($this->children) > 0 || count($this->prependchildren) > 0) {
            // There have been manually added items - there are definitely items.
            $outcome = true;
        } else if (!$this->ignoreactive) {
            // We will need to initialise the navigation structure to check if there are active items.
            $this->page->navigation->initialise($this->page);
            $outcome = ($this->page->navigation->contains_active_node() || $this->page->settingsnav->contains_active_node());
        }
        $this->hasitems = $outcome;
        return $outcome;
    }
151649
public function isBoolean()
    {
        return $this->data_type === PDO::PARAM_BOOL ||
            $this->data_type === (PDO::PARAM_BOOL | PDO::PARAM_INPUT_OUTPUT);
    }
908877
public function is_editable() {
        if ($this->is_locked()) {
            return false;
        }

        $grade_item = $this->load_grade_item();

        if ($grade_item->gradetype == GRADE_TYPE_NONE) {
            return false;
        }

        if ($grade_item->is_course_item() or $grade_item->is_category_item()) {
            return (bool)get_config('moodle', 'grade_overridecat');
        }

        return true;
    }
702400
public function &GetActiveShippingGroup()
    {
        if (is_null($this->oActiveShippingGroup)) {
            // fetch the one from the shop
            $oShopConfig = TdbShop::GetInstance();
            $oActiveShippingGroup = $oShopConfig->GetFieldShopShippingGroup();
            if (false == $this->SetActiveShippingGroup($oActiveShippingGroup)) {
                // unable to set - group not in allowed list
                $oList = $this->GetAvailableShippingGroups();
                $oList->GoToStart();
                if ($oList->Length() > 0) {
                    $oActiveShippingGroup = $oList->Current();
                    $this->SetActiveShippingGroup($oActiveShippingGroup);
                }
            }
        }

        return $this->oActiveShippingGroup;
    }
567102
public function valid()
    {
        if ($this->_currentPage == 0 || $this->_index % $this->_pageSize == 0 && $this->_index < $this->_totalItems)
        {
            $this->_getNextPage();
        }

        return $this->_index < $this->_totalItems;
    }