This question has been flagged

I need access to the product + variant names of all my website's (published) products on the "website_sale.product" page. I assume I need to create a module to import product/variant models into "website_sale.product". I have been watching hours of tutorials for creating modules, but it is extremely convoluted and complex to me. I don't even know how to begin (after creating the scaffold module). For example, I don't know when I need to inherit/import a controller vs. a model, etc.


Could someone provide all the code required to output all of the website's published products & their respective variants on the "website_sale.product" page?


For example, output text like this anywhere on the "website_sale.product" page:

MyProduct1: Colors: green, blue, red | Sizes: 5x4', 2x2', 3x3'

My Product2: Colors: yellow, green, orange | Sizes: 3x9', 2x2', 6x6'

My Product3: Colors: red, purple, blue, cerulean | Sizes: 4x4', 2x2', 6x6'


Avatar
Discard