Calling Shopware()->Router()->Assemble() from a cron

If I call Shopware()->Router()->Assemble() from a cron I am getting no rewrite and the host is missing, i.e. passing Shopware()->Front()->Router()->assemble(array( ‘controller’ => ‘blog’, ‘Category’ => 376, ‘action’ => ‘detail’, ‘blogArticle’ => 3, ‘module’ => ‘frontend’ )); gives http:///blog/detail/Category/376/blogArticle/3 from the cron event, can anyone tell me how to fix this?

Ok so I found out why I need to register the shop resources by putting Shopware()-\>Bootstrap()-\>registerResource('shop', $shop); where $shop is a reference to a shop However once the router has a shop, it will ignore any other shop resources you overwrite it with. This is from onFilterUrl in the router bootstrap if ($this-\>shop === null && $params['module'] == 'frontend') { $this-\>initShopConfig(); } I don’t want to edit the bootstrap, is there a way to make a plugin that will call initShopConfig()? It is a protected function within the core bootstrap (Shopware_Plugins_Core_Router_Bootstrap).

What is the goal of your cronjob? If you like to get a seo URL there are some other ways to get this work. Best Reagards Martin

I am making a plugin that generates a different site map, the site map is indexed and has certain settings, I need to call assemble on different shops to get their urls :slight_smile:

Sorry you say there are other ways? I misread this :slight_smile: What are they? Thanks for your help

Anyone able to tell me how?