Jump to content

Override Admin controller on Prestashop 1.6.1.11


Recommended Posts

Hi

I try to override AdminStoresController.php

I've create override/controllers/admin/AdminStoresController.php

My file is like that : 

<?php
class AdminStoresController extends AdminStoresControllerCore
{
    public function renderForm()
    {
        if (!($obj = $this->loadObject(true))) {
            return;
        }
 
        $image = _PS_STORE_IMG_DIR_.$obj->id.'.jpg';
        $image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350,
            $this->imageType, true, true);
        $image_size = file_exists($image) ? filesize($image) / 1000 : false;
 
        $tmp_addr = new Address();
        $res = $tmp_addr->getFieldsRequiredDatabase();
        $required_fields = array();
        foreach ($res as $row) {
            $required_fields[(int)$row['id_required_field']] = $row['field_name'];
        }
......
 
I delete class_index.php on cache folder.
I don't understand why it doesn't work. Has anyone ever encountered this problem?
 
Thanks for your help
Link to comment
Share on other sites

  • 2 months later...

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...