Jump to content

Recommended Posts

Hey there,
 
I'm trying to override BlockBestSeller module but i'm failing hard.
I created a new field on my BO, I need to display it on front. It works for the product-list page, and every page I need, override works.
 
My problem is too display my field on the blockBestSeller (my field is a second product name for SEO).

 

I created blockbestsellers.php in override>classes>module>blockbestsellers>blockbestsellers.php within :

<?php
 
if (!defined('_CAN_LOAD_FILES_'))
    exit;
 
class BlockBestSellersOverride extends BlockBestSellersCore
{
    public $nom_produit;
 
    public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null)
    {
      Product::$definition['fields']['nom_produit'] = array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString');
      parent::__construct($id_product, $full, $id_lang, $id_shop, $context);
    }
 
}

I guess there is an error or something, i tried lot of things, but anyway, i can't get it..

 

Can someone help me please ?!

Edited by Lambert_TMC (see edit history)
Link to comment
Share on other sites

I created blockbestsellers.php in override>classes>module>blockbestsellers>blockbestsellers.php within :

right path is: /override/modules/blockbestsellers/

 

 

class BlockBestSellersOverride extends BlockBestSellersCore

right class overload is:

class BlockBestSellersOverride extends BlockBestSellers



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