So I have a Magento Page with 3 products on it and the images/prices/product title are all hard coded. in HTML how can I make it so that the price is not hard coded and whenever the product price changes, the price will change on that page too for those 3 products? I say html because it's on a Magento page.
1 Answer
I would ditch the hard-coding and use Magento's "Catalog Products List" widget. You can specify a bunch of criteria in the widget to show the products you want, e.g. from a certain category or - in your case - based on their IDs.
An overview to widgets is here, I'm not affiliated with this I just found it in Google:
https://www.humcommerce.com/tutorial/add-widgets-in-magento-2/
If your page needs a drastically different way of displaying the data, you could insert each product in its own widget and heavily customize the CSS as required.
If this is too generic then you'll be in the territory of writing your own block classes and rendering them with phtml templates within the page, which is a whole different ball game.