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

Configurable Product Url For Google Shopping/ Merchant
 
amardeeprai
Jr. Member
 
Total Posts:  3
Joined:  2012-09-24
 

Hi,

I want to send the url for the configurable product when uploading to Google Merchant, however the urls for the simple products keep on being sent instead.

Does anyone know how to change the code for this?

I have created a new attribute named ‘link’ however I can’t map this attribute to the Link of my simple products.

public function convertAttribute($product$entry)
    
{
        $url 
$product->getProductUrl(false);
        if (
$url{
            
if (!Mage::getStoreConfigFlag('web/url/use_store')) {
                $urlInfo 
parse_url($url);
                
$store $product->getStore()->getCode();
                if (isset(
$urlInfo['query']) && $urlInfo['query'!= ''{
                    $url 
.= '&___store=' $store;
                
else {
                    $url 
.= '?___store=' $store;
                
}
            }

            $links 
$entry->getLink();
            if (!
is_array($links)) {
                $links 
= array();
            
}
            $link 
$entry->getService()->newLink();
            
$link->setHref($url);
            
$link->setRel('alternate');
            
$link->setType('text/html');
            if (
$product->getName()) {
                $link
->setTitle($product->getName());
            
}
            $links[0] 
$link;
            
$entry->setLink($links);
        
}

        
return $entry;
    
}

I have tried changing the code to $url = $this->getGroupAttributeLink(); but that does not seem to work either.

Any pointers would be great.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Drumit84
Jr. Member
 
Total Posts:  3
Joined:  2012-11-13
 

I am having the same issue. Have you found a solution?

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