Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Reset BaseURL
 
Rolf Bachmann
Jr. Member
 
Total Posts:  7
Joined:  2007-12-20
 

Hi
how can i change the baseurl. I’ve an external webapplication where I want to show a list of products.See following code:

<?php
    
require_once('../app/Mage.php');
    
umask(0); 
    
Mage::app('default');  
    
$className Mage::getConfig()->getBlockClassName('catalog/product_list'); 
    
//Mage_Catalog_Block_Product_List
    // means Ordner app/core/Mage/Catalog/Block/Product/List    
    
$block = new $className(); 
    
$className Mage::getConfig()->getBlockClassName('core/template'); 
    
$toolbar = new $className(); 
    
$block->setChild('toolbar'$toolbar); 
    
    
//choose whatever category ID you want L
    
$block->setCategoryId(15); 
    
$block->setTemplate('catalog/product/list.phtml'); 
    
/* 
        here I'd like to change the base url. because the image link,
        detail link and so on, should point to the real shopsite.
        shopsite is for example http://localhost/shop
        webapp is for example http://localhost/webapp
       
    */
    
echo $block->renderView(); 
?>

any help is appreciated
rolf

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top