AbanteCart Development > API Development

formatting for options using API


currently developing an app as a front-end of my shopping cart. how am i supposed to format the options when adding an item to the customer's cart (rt=a/checkout/cart)?

eCommerce Core:
You need to add 'option' : {} to your post

To know format and values you can first run a/product/product to get product options.

Check this example:

Or demo:

aha! i found the solution. the format is multiple instances of option[ID]=VALUE . i had to look at the method params in the api test to find that out. never knew that such a page existed. it was very helpful.

in C# i'm using the following:

for (int i=0; i<options.Count; i++)
   frmProduct.AddField("option[" + options[i].ToString() + ']', optionValues[i].ToString());

where options and optionValues are both instances of System.Collections.ArrayList


[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod