我使用的是magento,它的內置功能用於將產品添加到Google Base。我想對其進行更改,以便使用簡短說明作爲Google Base中的說明。與詳細描述相反。Magento - 使用簡短說明適用於Google基本說明
1
A
回答
1
根據this Screencast你應該能夠設置屬性屬性映射。這不適合你嗎?
尋找更深層次的,我沒有一個谷歌帳戶的基礎,所以我不能對此進行測試,但是,當我搜索通過谷歌基本模塊,它看起來像這是它抓住了描述
app/code/core/Mage/GoogleBase/Model/Service/Item.php
protected function _setUniversalData()
{
//...
if ($object->getDescription()) {
$content = $service->newContent()->setText($object->getDescription());
$entry->setContent($content);
}
//...
}
這裏
我一般的做法是創建一個覆蓋有關Mage_GoogleBase_Model_Service_Item
類_setUniversalData
方法,看起來像這樣
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;
}
祝你好運!
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 /代碼/核心/法師/的GoogleBase /型號/服務
/Item.php
0
我最終得到了該模塊的工作,並設法解決所有錯誤。
我把如何設置Magento的谷歌Base資訊,包括帳戶配置在一起短一步一步的指導,將狀態屬性&映射屬性和他們在這裏發佈http://blog.pod1.com/e-commerce/magento-google-base-feed/
0
Magento的1.7.0.2谷歌購物1.7.0.0
app/code/core/Mage/GoogleShopping/Model/Attribute/Content.php
變化$description = $this->getGroupAttributeDescription();
在$description = $this->getGroupAttributeShortDescription();
相關問題
- 1. magento在crossell中顯示簡短說明
- 2. Wordpress中的簡短說明
- 3. IL短格式說明並不簡短?
- 4. 格式說明用於短整型
- 5. 使用說明
- 6. PHP代理 - 基本說明
- 7. 更新產品名稱,描述,Magento中的簡短說明
- 8. Return簡要說明
- 9. 使用clipRect - 說明
- 10. 關於樣本的說明
- 11. 說明Magento緩存系統
- 12. 版本說明,用於什麼?
- 13. 需要關於AutoMapper的使用說明
- 14. Google Sitemap中URL的說明
- 15. 說明使用類變量?
- 16. nw-builder - 使用說明
- 17. Rails資產使用說明
- 18. 說明代碼:使用FirstorDefault()
- 19. PHP OOP線使用說明
- 20. Python Argparse使用說明
- 21. 使用說明javacc令牌
- 22. MVC.Net用戶說明
- 23. 說明
- 24. 說明
- 25. 說明
- 26. Google Apps腳本日曆說明 - 換行
- 27. 基於語言的安裝說明
- 28. 簡要說明作用域規則的?
- 29. 編譯選項基本./configure說明
- 30. 組裝的基本c的說明
映射只能用於非默認屬性。描述似乎是硬編碼的地方,但我找不到在哪裏。 – a1anm 2010-04-04 14:45:02
用更多信息更新答案。祝你好運! – 2010-04-04 19:40:04