1

私は magento を使用しており、製品を Google ベースに追加するための機能が組み込まれています。簡単な説明を Google ベースの説明として使用するように変更したいと考えています。詳細な説明とは対照的に。

4

4 に答える 4

1

このスクリーンキャストによると、属性属性のマッピングを設定できるはずです。それはあなたのために働いていませんか?

深く見てみると、私はグーグルベースアカウントを持っていないので、これをテストすることはできませんが、グーグルベースモジュールを検索すると、これが説明をつかんでいるように見えます

app/code/core/Mage/GoogleBase/Model/Service/Item.php    
protected function _setUniversalData()
{
    //...
    if ($object->getDescription()) {
        $content = $service->newContent()->setText( $object->getDescription() );
        $entry->setContent($content);
    }
    //...
}

ここでの私の一般的なアプローチは、次のようなクラスの_setUniversalDataメソッドのオーバーライドを作成することです。Mage_GoogleBase_Model_Service_Item

protected function _setUniversalData()
{
    parent::_setUniversalData();

    //your code to parse through this object, find the long desription, 
    //and replace with the short.  The following is pseudo code and just 
    //a guess at what would work
    $service = $this->getService();
    $object = $this->getObject();
    $entry = $this->getEntry();     

    $new_text   = $object->getShortDescription(); //not sure on getter method
    $content = $service->newContent()->setText( $new_text );
    $entry->setContent($content);

    return $this;
}

幸運を!

于 2010-04-03T21:19:47.810 に答える
1

私がしなければならなかったのは、変更することだけだとわかりました:

if ($object->getDescription()) {
    $content = $service->newContent()->setText( $object->getDescription() );
    $entry->setContent($content);
}

if ($object->getDescription()) {
    $content = $service->newContent()->setText( $object->getShortDescription() );
    $entry->setContent($content);
}

app/code/core/Mage/GoogleBase/Model/Service/Item.php 内

于 2010-04-05T11:56:07.087 に答える
0

マジェント 1.7.0.2 グーグルショッピング 1.7.0.0

app/code/core/Mage/GoogleShopping/Model/Attribute/Content.php

変化する $description = $this->getGroupAttributeDescription();

$description = $this->getGroupAttributeShortDescription();

于 2013-06-30T14:07:53.503 に答える
0

最終的にモジュールが動作するようになり、すべてのエラーを修正することができました。

アカウントの構成、条件属性とマッピング属性の追加、およびここでの公開を含む、Magento Google Base フィードのセットアップ方法に関する短いステップバイステップのガイドをまとめましたhttp://blog.pod1.com/e-commerce/ magento-google-base-feed/

于 2010-09-28T13:05:42.333 に答える