Jump to content

MODULE Dev. product list query to module admin page


Recommended Posts

Hi everyone,

I'm trying to create myfirst module and I'm pretty new to programming too. I can't find any good information for my qüestions.

I started by downloading the starter module generator template.

1st of all, I don't know where to place my query should it be into a new public function or inside getConfigFormValues() --- here is where I've got some tiny  but wrong results

     $query = 'SELECT reference FROM `'._DB_PREFIX_.'product` WHERE `price` < 39;
     $arV = Db::getInstance()->executeS($query)
     return array('arV' => $arV)

2nd I'd like to create a list (table or select/option panel) with those results so I could chose 1 of them.
     My main problem is that I only achieved to get the last result into a textarea. My concern is, should I keep trying to get them from PHP file o trying something to call the result from configure.TPL file?
 

Any help or guidance would be appreciated.

Thanks in advanced

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...