我使用的是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 1.9
- 2. magento在crossell中显示简短说明
- 3. Wordpress中的简短说明
- 4. 更新Docker Hub上的简短说明和完整说明
- 5. IL短格式说明并不简短?
- 6. 格式说明用于短整型
- 7. Vaadin Google说明
- 8. 使用说明
- 9. PHP代理 - 基本说明
- 10. 需要Javascript基本说明
- 11. 更新产品名称,描述,Magento中的简短说明
- 12. Return简要说明
- 13. 使用clipRect - 说明
- 14. 关于样本的说明
- 15. 版本说明,用于什么?
- 16. 说明Magento缓存系统
- 17. 关于指针使用的说明
- 18. 需要关于AutoMapper的使用说明
- 19. Android版本说明
- 20. 简单递归说明
- 21. 简单功能说明
- 22. Google Sitemap中URL的说明
- 23. 说明使用类变量?
- 24. 使用说明与计数
- 25. Rails资产使用说明
- 26. PHP OOP线使用说明
- 27. 说明代码:使用FirstorDefault()
- 28. 使用说明javacc令牌
- 29. Python Argparse使用说明
- 30. nw-builder - 使用说明
映射只能用于非默认属性。描述似乎是硬编码的地方,但我找不到在哪里。 – a1anm 2010-04-04 14:45:02
用更多信息更新答案。祝你好运! – 2010-04-04 19:40:04