sInitSettings example

if ($feedModel->getCacheRefreshed()) {
                    $diffInterval -= $feedModel->getCacheRefreshed()->getTimestamp();
                }

                if ($diffInterval < $feedModel->getInterval() && file_exists($filePath)) {
                    continue;
                }
            }

            $export->sFeedID = $feedModel->getId();
            $export->sHash = $feedModel->getHash();
            $export->sInitSettings();
            $export->sSmarty = clone $sSmarty;
            $export->sInitSmarty();

            $handleResource = fopen($filePath, 'w');
            $export->executeExport($handleResource);
        }

        return true;
    }
}


    /** * @param sExport $export */
    private function generateFeed($export, ProductFeed $feedModel)
    {
        $this->output->writeln(sprintf('Refreshing cache for ' . $feedModel->getName()));

        $export->sFeedID = $feedModel->getId();
        $export->sHash = $feedModel->getHash();
        $export->sInitSettings();
        $export->sSmarty = clone $this->sSmarty;
        $export->sInitSmarty();

        $fileName = $feedModel->getHash() . '_' . $feedModel->getFileName();

        $feedCachePath = $this->cacheDir . '/' . $fileName;
        $handleResource = fopen($feedCachePath, 'w');

        if (!\is_resource($handleResource)) {
            throw new RuntimeException(sprintf('Feed cache path %s can not be opened', $feedCachePath));
        }

        


    /** * initialize the base class sExport */
    private function prepareExport()
    {
        $this->export->sSYSTEM = Shopware()->System();
        $this->export->sFeedID = (int) $this->Request()->feedID;
        $this->export->sHash = $this->Request()->hash;

        $this->export->sInitSettings();
    }

    /** * set feed specific options to the export and sets * the right header */
    private function sendHeaders()
    {
        $encoding = $this->getExportEncoding();
        $contentType = $this->getExportContentType();

        
Home | Imprint | This part of the site doesn't use cookies.