Hi,
I have a question about how to implementing add a item to shopping cart function on a e-commerce website, there are some Django tutorial online shows how to write add_to_cart
function for a online store, but on those tutorial they only show how to get item from one model. What if a online store has multiple category products and they use different Models to represent different category products, how do I use only one add_to_cart
function to get what ever category product I need? Or I have to write multiple add_to_cart
function for each category (Model) to make it work?
Thanks!