1 Box OBJ-CART

Through this component it is allowed to add a cart or shopping basket element to a form. The system, in turn, provides the necessary mechanisms to manage the contents of the basket, such as:

  • Add an article
  • Remove an article
  • Modify article quantities
  • Empty the basket
  • Generate the order

When defining a box of this type, the system provides a javascript function needed to add an element to the cart. This javascript function that allows to add an element in the cart is automatically issued in the HTML code of the page when the cart component is issued. The necessary hidden fields, one for each column indicated in the maintenance, are also issued automatically. When this function is invoked, it must be passed as arguments, as many as defined columns and a last optional argument that indicates the initial quantity with which the article will be added to the cart (by default it is 1). The javascript function looks like this: