Hello,
We are trying to integrate our billing system with your notification system (INS) and having a problem. We can not find item counts.
For example, there is an order:
5 hats, $50 each and 3 belts $40 each.
Total: $370
What parameter of INS will tell us how many hats and how many belts were sold?
Thank you.
3 Comments »
+0
-0
There is not a specific parameter that defines the quantity of particular items. This is because each individual item ordered will be passed back as its own line item. This means that each item ordered will have its own set of ‘item_’ parameters passed back to your INS script.
For example, say these ‘item_’ parameters were passed back for 2 of the same belt:
item_name_1=belt
item_id_1=5
item_name_2=belt
item_id_2=5
As we see in the example, each individual item will get their own set of ‘item_’ parameters. To retrieve the quantity number, the best suggestion is to have your INS script either count the number of times the ‘item_name_#’ is ‘belt’ or the number of times the ‘item_id_#’ is ‘5′.
+0
-0
Just an additional info to get the quantity of each items ordered. For example, to get the 5 hats and 3 belts:
item_name_1=hats
item_quantity_1=5
You can iterate the how many items were ordered. I can give you an example code if you can tell me the development language you are using.
+0
-0
Thank you. PHP code sample would be good.