This table will hold products record. If you liked this article or you have questions or suggestions, just post comment here.
If you have great suggestions to improve the package I may implement your ideas in the class in the future. That is why we style it here. Here the getProductData private method gets handy.
It is passed by the AJAX requests and we need to translate it to the index position of our products array in order to use it, which is the purpose of the findpos function. Nothing beats experience when it comes to learning.
Else, we will display 'update cart' button. If the cart does exist, the script checks if the item being added to the cart is already one of the items in the cart. Now lets take a look at the styles that target the shopping cart section. Just let me know.