小编Rad*_*adu的帖子

有没有办法阻止magento索引器进程?

我搜索过类似的主题,但似乎没有解决方案.有没有办法阻止特定的magento索引器进程?

当我尝试从shell重新索引时,我得到了这个:

php -f indexer.php reindex all
Stock Status Index process is working now. Please try run this process later.
Product Prices Index process is working now. Please try run this process later.
Catalog URL Rewrites Index process is working now. Please try run this process later.
Product Flat Data Index process is working now. Please try run this process later.
Category Flat Data Index process is working now. Please try run this process later.
Category Products Index process is …
Run Code Online (Sandbox Code Playgroud)

magento

14
推荐指数
2
解决办法
3万
查看次数

AWS SES S3处理入站电子邮件

我正在开发基于AWS SES的电子邮件系统发布.对于所有传入的电子邮件,我设置路由以将消息保存在S3存储桶中,以便我可以异步处理它们.我遇到的问题是消息以原始格式保存在S3存储桶中:标题,电子邮件正文等+加密附件(一个巨大的字符串) - 全部在一个文件中.

有没有办法将电子邮件消息从附件中分离出来并将它们保存在AWS SES级别的单独文件中?我正在尝试直接从AWS获取我需要的格式的数据,并避免在流程中添加另一个处理步骤.

如果AWS SES不提供此类功能,那么处理这些消息以获得上述结果的正确方法是什么?

amazon-s3 amazon-ec2 amazon-sns amazon-ses aws-lambda

7
推荐指数
2
解决办法
7909
查看次数

在管理区域中启用Magento Varien_Profiler

如何在管理区域中启用Magento Profiler?

我已经设置了admin选项,Varien_Profiler::enable();之前添加Mage::run($mageRunCode, $mageRunType);并清除了缓存,但是探查器结果只显示在前端?

我错过了别的什么吗?

profiling magento

6
推荐指数
1
解决办法
5489
查看次数

流浪问题

我有一个由流浪汉和厨师制作的虚拟机.昨晚我的计算机在VM启动并运行时意外重启.在那之后,当我尝试让VM变得流行时,我得到了: Chef从未成功完成!任何错误都应该在上面的输出中可见.请修复您的食谱,以便它们正确完成.

[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Running any VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network …
Run Code Online (Sandbox Code Playgroud)

chef-infra vagrant

5
推荐指数
1
解决办法
1万
查看次数

Symfony2 Forms - 如何使用动态选择选项

我正在处理用于发送通知的表单.在我的形式中,除其他字段外,还有一个输入文件字段.在这个字段中,我正在加载一个CSV文件.从CSV(包含一列电子邮件)我正在使用https://code.google.com/p/jquery-csv/提取数据,并将其添加到选择了所有选项的选择只读多个字段.

注意:我使用表单类型(Symfony2书籍)创建了表单 - class NotificationType extends AbstractType; 表格通过AJAX提交;

1. Strike one 考虑到动态填充select字段,我决定将它添加到表单构建器,而是使用JavaScript注入它.

这是一个糟糕的举动,因为在提交表单时,Symfony2会验证表单构建器中添加的字段是否是提交的字段.返回的错误是:此表单不应包含额外的字段.

2. Strike two 继续从strike 1开始我想看看我是否可以解决这个问题,所以我在表单生成器中添加了select字段但没有选项,也通过JavaScript注入选项.

仍然没有运气.Symfony2还确保在添加字段时无法提交未添加到表单构建器的选项.返回的错误是:此值无效.

3. Strike 3 从Strike 1和2中,我猜这个工作的唯一方法是在添加字段时在choices数组中添加所有可能的选项.这样,字段和选项对提交有效.

但这不是我认为可行的选项,特别是因为在选择字段中我期待10000个可能的结果,在我加载CSV文件之前我不知道.

你能为这个推荐任何其他方法吗?

谢谢!

php forms ajax jquery symfony

5
推荐指数
1
解决办法
4215
查看次数

Magento更新产品属性而不触发reindex

是否可以在不触发reindex的情况下更新产品属性?

众所周知,load()/ setData()/ save()场景会触发reindex.

我查看了'Mage_Catalog_Model_Product_Action'中的'updateAttributes'方法,但我认为它还会触发产品重新索引.

/**
     * Update attribute values for entity list per store
     *
     * @param array $productIds
     * @param array $attrData
     * @param int $storeId
     * @return Mage_Catalog_Model_Product_Action
     */
    public function updateAttributes($productIds, $attrData, $storeId)
    {
        $this->_getResource()->updateAttributes($productIds, $attrData, $storeId);
        $this->setData(array(
            'product_ids'       => array_unique($productIds),
            'attributes_data'   => $attrData,
            'store_id'          => $storeId
        ));

        // register mass action indexer event
        Mage::getSingleton('index/indexer')->processEntityAction(
            $this, Mage_Catalog_Model_Product::ENTITY, Mage_Index_Model_Event::TYPE_MASS_ACTION
        );
        return $this;
    }
Run Code Online (Sandbox Code Playgroud)

"// register mass action indexer event"下的代码似乎触发了索引器操作.

magento

3
推荐指数
2
解决办法
5542
查看次数