draj840143 2015-10-08 16:18 采纳率: 100%
浏览 35

Mailchimp api v1.1 listUpdateMember如何发送复选框字段?

Ok I know it's dated but it's a legacy plugin I need to update.

I am trying to use the listUpdateMember to update a checkbox field in mailchimp. I have the normal merge_vars updating FNAME, LNAME etc but the GROUPINGS one does nothing and returns no errors. My last attempt at this was to create a manual array

$group = [array('id' => '3525', 'name' => 'Interests', 'groups' => array('General', 'Education'))];

Assign this to $merge_vars['GROUPINGS'] and then send it via the created api

$api->listUpdateMember($listId, $email, $merge_vars);

As I said the other fields get updated but not the interests checkbox group.

So my main problem is knowing what the GROUPINGS variable is expecting as an array if someone could set it out as a php array I can then re-create this from my form fields.

Any help much appreciated.

  • 写回答

1条回答 默认 最新

  • dpjo15650 2015-10-13 14:39
    关注

    Eventually worked this out myself after lots of head scratching not helped by an annoying browse cache!

    'GROUPINGS'=>array(
                    array( 'groups' => 'comma, separated, list, of, options', 'id' => '[groupId]' )   
                )
    

    [groupId] can be found by calling yourApiModel->listInterestGroupings($listId)

    评论

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据