Jump to content

Class override not working in PS 1.6.1.1


JuanTomas

Recommended Posts

I have a PS 1.6.1.1 instance where I've imported a large number of Customer records including password hashes created by ZenCart.  The import module I used comes with an override class in Customer.php, which adds the functionality to check/decode those hashes for legacy customers.  It's pretty much exactly what JoAo Cunha was doing with PS1.5x here: https://www.prestashop.com/forums/topic/163534-integrating-zen-cartoscommerce-passwords-with-prestashop/

 

THE PROBLEM: the override class never gets loaded.  If this seems like a familiar problem, I've already seen and tried the following solutions:

  • Put Customer.php (class Customer extends CustomerCore) in prestashop/override/classes
  • Make sure Customer.php is readable to the apache2 user (www-data on my system)
  • Blow away prestashop/cache/class_index.php (Wanted to make sure you know I did that.)
  • Verify there are no subfolders in override/controllers/front which might contain override classes
  • Clear cache in BO -> Advanced Parameters -> Performance
  • Make sure all Debug options (disable all overrides) are set to NO in Performance -> Debug
  • Make sure _PS_MODE_DEV_ is set to 'false' in prestashop/config/defines.inc.php
  • Review http://doc.prestashop.com/display/PS16/Overriding+default+behaviors

PS generates a new class_index.php file each time, and each time it contains this snippet:

 

 

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

 

This suggests to me that PS 1.6.1.1 perhaps doesn't detect overriding classes the same as previous versions?

 

 

  • Like 1
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...