`
kirenenko04
  • 浏览: 153242 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Batch Set Customer Default Billing Address as Shipping Address

 
阅读更多
	public function run(){
		//search all customer.
		$collection = Mage::getModel("customer/customer")->getCollection()->addAttributeToSelect("*");
		//->addFieldToFilter("email",'bobo.wang@bysoftchina.com');
		foreach ($collection as $customer) {
			if ($customer->getDefaultShippingAddress()) {
				$addressId = $customer->getDefaultShippingAddress()->getId();
				$address  = Mage::getModel('customer/address')->load($addressId);
				$address->setCustomerId($customer->getId())
				->setIsDefaultBilling('1');
				$address->save();
				var_dump('customer:'. $customer->getEmail());
				var_dump($address->getData());
				var_dump('save default billing id:'.$addressId.' successed!');
			} else {
				var_dump('customer:'. $customer->getEmail() . ' has no default shipping address');
			}
		}
	}

 

分享到:
评论

相关推荐

    tjh_batch_attr_set批量属性属性修改Maya插件1.0.7更新1

    【tjh_batch_attr_set 插件详解】 tjh_batch_attr_set 是一款专为 Maya 用户设计的批量属性管理插件,自2017年推出以来,它已经发展成为一个功能强大的工具,尤其适合大规模场景建模师、动画师、渲染师和特效师。该...

    Batch_import default name.ms

    一次性批量导入模型,自动按模型名字和路劲重命名,支持3dsmax2014到2018的版本。使用的时候,打开脚本,自己定义文件夹的路径,用反斜杠分割即可。

    Batch Normalization

    We refer to this phenomenon as internal covariate shift, and address the problem by normalizing layer inputs. Our method draws its strength from making normalization a part of the model architecture ...

    SpringBoot+Batch实现

    spring batch官方文档:https://docs.spring.io/spring-batch spring batch3.x中文文档:http://www.kailing.pub/SpringBatchReference spring batch官方入门实例:https://projects.spring.io/spring-batch/ 简单...

    The Definitive Guide to Spring Batch, 2nd Edition.epub

    Work with all aspects of batch processing in a modern Java environment using a selection of Spring frameworks. This book provides up-to-date examples using the latest configuration techniques based on...

    Spring Batch in Action英文pdf版

    Spring Batch是一个开源的轻量级、全面的批处理框架,它是为了解决企业应用中的大规模数据处理需求而设计的。Spring Batch in Action是一本专注于Spring Batch框架的书籍,由Arnaud Cogoluègnes、Thierry Templier...

    spring-batch包

    Spring Batch 是一个强大的、全面的批处理框架,用于处理大量数据的处理任务。它由 Spring 框架提供支持,因此具有高度的可配置性和可扩展性,适用于各种企业级应用。Spring Batch 4.0.0 版本是该框架的一个重要版本...

    SETRES

    标题“SETRES”所指的是一个命令行工具,用于在Windows操作系统中改变计算机的屏幕分辨率和刷新率。在批处理文件中使用SETRES,可以自动化这个过程,尤其在系统配置、测试或者无人值守的环境中非常实用。 批处理...

    Spring Batch批处理框架

    Spring Batch是一个开源的轻量级批处理框架,它提供了一整套可复用的组件,用于构建健壮且高效的批处理应用程序。由于信息给定的【部分内容】并没有提供实际的技术细节,因此我将基于Spring Batch框架本身,详细介绍...

    SpringBatch+Spring+Mybatis+MySql (spring batch 使用jar)

    Spring Batch是一个轻量级的,完全面向Spring的批处理框架,可以应用于企业级大量的数据处理系统。Spring Batch以POJO和大家熟知的Spring框架为基础,使开发者更容易的访问和利用企业级服务。Spring Batch可以提供...

    tensorflow中next_batch的具体使用

    本文介绍了tensorflow中next_batch的具体使用,分享给... """Return the next `batch_size` examples from this data set.""" if fake_data: fake_image = [1] * 784 if self.one_hot: fake_label = [1] + [0] *

    spring-batch分区处理示例

    Spring Batch 是一个强大的Java框架,专门用于处理批量数据处理任务。在Spring Batch中,分区处理是一种优化策略,它将大型工作负载分解成多个较小、独立的任务,这些任务可以在不同的线程或甚至不同的节点上并行...

    SpringBatch批处理框架

    资源名称:Spring Batch 批处理框架内容简介:《Spring Batch 批处理框架》全面、系统地介绍了批处理框架Spring Batch,通过详尽的实战示例向读者展示了Spring Batch框架对大数据批处理的基本开发能力,并对框架的...

    springbatch 详解PDF附加 全书源码 压缩包

    **Spring Batch 深度解析** Spring Batch 是一个强大的、全面的批处理框架,由 Spring 社区开发,旨在简化企业级应用中的批量数据处理任务。这个框架提供了一种标准的方式来处理大量的数据输入和输出,使得开发者...

    quartz整合springbatch动态集群定时实现mysql参考

    Quartz和Spring Batch是两种非常重要的Java开源框架,它们在企业级应用开发中扮演着重要角色。Quartz主要用于任务调度,而Spring Batch则专注于批量处理。在这个“quartz_springbatch_dynamic”项目中,我们将看到...

    Spring Boot整合Spring Batch,实现批处理

    在Java开发领域,Spring Boot和Spring Batch的整合是构建高效批处理系统的一种常见方式。Spring Boot以其简洁的配置和快速的启动能力深受开发者喜爱,而Spring Batch作为Spring框架的一部分,专注于批量处理任务,...

    基于Spring Batch的大数据量并行处理

    ### 基于Spring Batch的大数据量并行处理 #### 概述 Spring Batch是一款用于高效处理大量数据的开源框架,特别适用于批处理任务。它由Spring Source与Accenture合作开发,结合了双方在批处理架构和技术上的优势,...

    SAP-17LSMW使用Standard Batch导入BOM.docx

    SAP-17LSMW 使用 Standard Batch 导入 BOM SAP-17LSMW 是 SAP 系统中的一种数据导入工具,使用 Standard Batch 可以将批量数据导入到 SAP 系统中。以下是在 SAP-17LSMW 中使用 Standard Batch 导入 BOM(物料清单)...

    spring-batch同步数据库mysql源码

    《Spring-Batch同步数据库MySQL源码解析》 在IT领域,数据同步是一项至关重要的任务,尤其是在分布式系统中,保持数据库的一致性是确保系统稳定运行的关键。Spring-Batch作为Spring框架的一部分,为批量处理和数据...

    Spring Batch API(Spring Batch 开发文档).CHM

    Spring Batch API(Spring Batch 开发文档).CHM。 官网 Spring Batch API,Spring Batch 开发文档

Global site tag (gtag.js) - Google Analytics