We appreciate the feedback.
What is it that you are trying to do? Perhaps I can provide some direction.
We concentrate a lot of time and resources to documentation and have a primary interest in making things easier. Unfortunately we don't always succeed, but we will keep trying to do better. If you continue to use our tools you will see they continually get both more functional and easier to use and in the meantime more and more documentation will become available.
This is the nature of our products and what they do. We take something that might not be possible for a new web developer and make it as easy as possible. We then write documentation describing what we have done. As we get feedback from our customers we try to make it easier and easier and write documentation to address the specific problems they are facing.
Adding an add to cart button can insert up to 3 distinct pieces of code onto your page.
1) It adds the cart object onto the very top of the page in the form of two include files.
There is one include file that is named after the cart object you created. It contains all of the information from that interface. Your columns, calculations, tax, shipping, discounts, etc. , and another definition file that contains functions defined to be used with the cart. The defintion file never changes except when you update ecart.
It will also add a line of code to repopulate the cart object created in the include file from the session or cookie depending on your cart settings. At that point you have an eCart object with your settings that is populated with an array of Items that persists through the session or cookie.
As part of the object it also adds a chunk of code to redirect to another page just above the <html>, but below all other server side code. This is added so that we can do multiple actions above and if you were to set multiple redirects it would still only redirect once after all of the actions complete because it uses this redirect code instead of redirecting inline where it might disrupt an overall process.
2) It adds a form, which is used to initiate the add to cart with a button and provides form fields to input values such as the quantity.
3) Then there is the add to cart code. It will be placed between the cart object defintion, and population code, but above the redirect code of the object. It will trigger off of the button submit event, so you will see it checks if $_POST['addtocartbuttonname'] is set. It then takes the values from the form as well as the values you set in the add to cart interface and adds an item to the session or cookie item array before setting the redirect value which takes you to the next page.