打开购物车 |为所有客户组设置默认税率,包括将来可能添加的客户组 | PHP

Opencart | Set default Tax rate to all customer groups including ones that might be added in future | PHP

我想默认将 15% 的 GST 添加到所有客户组,包括可能在 future.Right 中添加的客户组,现在我们在每次新客户组时手动执行以下步骤添加:

  1. Navigate System->Localisation
  2. Under Localisation -> Taxes-> Tax rates
  3. Click action , next GST to edit Tax rate
  4. Select the customer groups
  5. Save the change and clear cache ( Modificiations-> refresh)

谢谢, 纳文

当您创建一个新的客户组时,有一个名为 oc_tax_rate_to_customer_group 的 table,它更新为 customer_group_id => tax_rate_id 映射。

您可能只需要在创建客户组时向此table 添加一个查询。您将获得您想要的结果。