Basically we want to categories the total amount spend for those two category ( Therapy and oncology) individually.
Created number attribute whenever it see the respected value on the product category at the end of the order, the order count will get increase. Created number attribute for both of the categories.
We are capturing those category value under “product_category” at the close of the order. Therefore, we would like to capture the order individually spend for those two category. We can able to get the order amount on the attribute when customer purchased from single category (either Therapy or oncology). However, we aren’t getting expected amount on the attribute when customer purchased on both of the category. So, the total order amount get assigned in both of the categories and its getting mess up with total spending.
Please let me know the steps to get the total amount spend for each of these category.