Jump to content

Edit History

AdrianFajar

AdrianFajar


Change Questions

Hi, I have a questions.

I already make my custom module to insert some data to databases from back office and its work fine.
Now i want to show the data inserted to the Frontpage (image below) 

but i have no idea and been searching for days to do it, anyone knows how to display our custom data to Frontpage (image below) ?

 

image.thumb.png.8f91dd1d9f8c199b1738e474ef4a7bab.png

AdrianFajar

AdrianFajar

Hi, I have a questions.

I already make my custom module to insert some data to databases from back office and its work fine.
Now i want to show the data inserted to the Frontpage (image below) 

but i have no idea and been searching for days to do it, anyone knows how to display our custom data to Frontpage (image below) ?

 

image.thumb.png.8f91dd1d9f8c199b1738e474ef4a7bab.png

AdrianFajar

AdrianFajar

Hi, I have a questions.

I already make my custom module and try to make input to the database here is how i make insert in hookActionProductUpdate 

 

public function hookActionProductUpdate($params)

    {

        $id = (int)Tools::getValue('id_product');

        $names[] = Tools::getValue('name');

        $points[] = Tools::getValue('points');

        $db = Db::getInstance(_PS_USE_SQL_SLAVE_)

        foreach($names as $index => $name){

            $db->insert('product_ratings', [

                'id_product' => (int) $id,

                'name' => $name,

                'points' => $points[$index],

            ]);

        }

    }

 

but it insert nothing to database, does anyone have solutions for this?

×
×
  • Create New...