Mehdib92 Posted June 13, 2023 Share Posted June 13, 2023 Hi, For my module, I add a TypeaheadProductCollectionType on the product page (like the related product). It works to add a product or a combination (the data are correctly stored in the database) but I don't find how to retrieve the data and display them. Despite having everything in the database, not any product is displayed under the search field. Anyone knows how to do that ? Or have a clue ? Thanks Link to comment Share on other sites More sharing options...
Med solver Posted June 22, 2023 Share Posted June 22, 2023 go to ProductController.php search for this 'product' => $product_for_template, then before above ('product' => $product_for_template,) get data from database that you want then added to this $product_for_template like this : $product_for_template['myData'] = $myData; on your tpl file product.tpl show data like this $product.myData where ever you want to placed 1 Link to comment Share on other sites More sharing options...
Mehdib92 Posted June 24, 2023 Author Share Posted June 24, 2023 Thank you for your help. Instead of returning ['product' => $product_for_template], I was returning [$product_for_template] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now