Jump to content

Overriding Class Doesnt Work


smarmysam

Recommended Posts

Hi All,

 

I've added a new file called override/classes/ProductSale.php.  Then I've copied one method which is called by the script I am testing.

<?php

class ProductSale extends ProductSaleCore{

    public static function getBestSalesLight($id_lang, $page_number = 0, $nb_products = 10, Context $context = null)
    {
         ...
    }


I then delete my /cache/class_index.php file.

 

When it regenerates the class index file, it doesnt update for my overidden class

...
'ProductSale' => 
  array (
    'path' => '',
    'type' => 'class',
    'override' => false,
  ),
  'ProductSaleCore' => 
  array (
    'path' => 'classes/ProductSale.php',
    'type' => 'class',
    'override' => false,
  ),
...

So in effect, overriding is not working.  Anyone with any suggestions?  Thanks

 

Sam

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