dongmaopan5738 2013-01-20 00:34
浏览 40
已采纳

如何使用BigCommerce API使用核心PHP更新客户的customer_group_id?

I'm trying to write a PHP script for my BigCommerce site that runs nightly and places customers into specific Customer Groups based on certain criteria. I can do everything else I need other than actually update the the customer_group_id. BigCommerce documentation only shows GET methods available for customers. Please help. Thanks!

  • 写回答

2条回答 默认 最新

  • duan0417 2015-10-19 20:43
    关注

    The customer group ID on a customer can be updated. This has been around for maybe a year or more now. You can PUT to the customer resource and the customer_group_id is what you would want to change.

    Documented here: https://developer.bigcommerce.com/api/objects/v2/customer

    If you are using the PHP API Library then you could update a customer group ID on a customer with this kind of code:

    $request_body = array("customer_group_id" => 10);
    Bigcommerce:updateCustomer(50, $request_body);
    

    The above would update the customer with ID 50 to have a new customer group ID of 10.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度