Jump to content

Listing files under catalog on Prestashop module


Darek36custom

Recommended Posts

Hello

I have created module that works on Prestashop and I have PHP script that lists files under selected catalog.

 

<?php
if ($handle = opendir('.')) {
    while (false !== ($entry = readdir($handle))) {
        if ($entry != "." && $entry != "..") {
            echo "$entry" . "<br>";
        }
    }
    closedir($handle);
}
?>
Since I can not use PHP but split logic between end user view and controller i created two separate files I tried to work on it.

Now i stucked at a point in which I don't know how to use module controller to create an array of files and pass it to module front view. Any idea appreciated.

 

Darek

Edited by Darek36custom (see edit history)
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...