在账户页面和结账页面更新客户地址时触发哪个Prestashop 1.7挂钩 [英] Which Prestashop 1.7 hook is triggered, while updating customer address at Account Page and checkout Page

查看:12
本文介绍了在账户页面和结账页面更新客户地址时触发哪个Prestashop 1.7挂钩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能帮我了解一下,从帐户页或结账页更新/添加客户的地址详细信息时会触发哪个挂钩吗?

enter image description here enter image description here

另外,如何获取地址详细信息? 我正在使用

    foreach ($customer->getAddresses($customer->id) as $address) {
            $addressInfo=$address;
        }

using this to get the address details but not working when I first update the address.

Thanks

推荐答案

https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/

actionObjectAddBeres

位于:/class/ObjectModel.php

actionObjectAddAfter

位于:/class/ObjectModel.php

actionObjectUpdate之前

位于:/class/ObjectModel.php

actionObjectUpdateAfter

位于:/class/ObjectModel.php

actionObjectDeleteBeast

位于:/class/ObjectModel.php

actionObjectDeleteAfter

位于:/class/ObjectModel.php

*您的对象名称是地址*

并获取客户地址:

$this->context->customer->getAddresses()

这篇关于在账户页面和结账页面更新客户地址时触发哪个Prestashop 1.7挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆