Cannot declare class WishList when activate Prestashop Theme - prestashop

I uploaded theme in prestashop 1.7. When I want to install it i'm getting error 500, i turned on debug mode and now I see this error:
Compile Error: Cannot declare class WishList, because the name is already in use
And here is the code of this error:
in modules/leofeature/classes/WishList.php (line 566)
return Db::getInstance()->executeS(' SELECT wp.* FROM `'._DB_PREFIX_.'leofeature_wishlist_product` wp WHERE wp.`id_wishlist` = '.(int)$id_wishlist.''); }}
Can anyone help me with that?

You probably installed another module with a class of the same name : WishList

Related

Grails Auto generated code is with warnings and errors

I am using Intellij IDEA Ultimate and have Grails plugin installed. When i auto generate, let's say controller i have warnings like so : "Cannot infer argument types " for this code :
multipartForm {
flash.message = message(code: 'default.created.message',
args: [message(code: 'tekEvent.label',
default: 'TekEvent'), tekEventInstance.id])//We need id to see in created message
redirect tekEventInstance //redirect will open show() view and populate it with instance's data
}
And an error for 'tekEvent.label' .
Have MANY errors in generated views as well. It's not just me. My 3 fellows in team have the same problem as well. Would like to get a "Light" from you and pass it to them as well . Thanks ^_^

How to call a module static function from another module in PrestaShop 1.7+

I'm trying to call static function of module named: Mymodule from another module like this: Mymodule::doThis()
But got error:
Fatal error: Class 'Mymodule' not found
I know, I can use code:
include_once _PS_MODULE_DIR_.'mymodule/mymodule.php',
but I want to know if I can use class autoloading or other elegant way to achieve this
You can try this :
Mymodule::getInstanceByName('doThis');
more explanation here :
Get name of module in PrestaShop front controller

how to use Helper::validateLuhn($cardnumber) in omnipay

i have developed paypal pro by using omnipay.And i need to do card validation before payment process start.
Helper::validateLuhn($cardnumber)
But i am getting error like this:- Fatal error: Class 'Helper' not found
What is the reason for getting this error?Need to include any other file?Any help?
In order to use the Helper::validateLuhn() function, you need to add this to your php file:
use Omnipay\Common\Helper;

Building modified AOSP throws error (Trying to change API)

out/target/common/obj/PACKAGING/public_api.txt:4316: error 5: Added public field android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_MOVEMENT
******************************
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1) You can add "#hide" javadoc comments to the methods, etc. listed in the
errors above.
2) You can update current.txt by executing the following command:
make update-api
To submit the revised current.txt to the main Android repository,
you will need approval.
******************************
So i tried to add an #hide annotation to my member variable, but it will only give me another error:
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:233: cannot find symbol
symbol : class hide
location: class android.app.admin.DevicePolicyManager
#hide
How can I solve this problem?
I made the mistake of using #hide such as #Override, but you have to use it in a JavaDoc comment:
/**
* #hide
*/

yii-user-management Yumuser.php get() on a non-object yum_user_relations

I have just installed the yii-user-management module but when I try to access it via browser I get
Fatal error: Call to a member function get() on a non-object in ..../modules/user/models/YumUser.php on line 368
$relations = Yii::app()->cache->get('yum_user_relations');
Appreciate any help.
It seems like the yii-user-management module requires a cache component for it to work. So in your application config add the cache component as
'cache'=>array(
'class'=>'CDummyCache',
),
Here we are using CDummyCache copmponent which is, as its name says, acts as a dummy. You can replace it by any other cache components as described here
Thanks #dInGd0nG. Your answer works for me too. Just would want to remind people to follow his link. In the link, you will see the configure statement shall be added in
'components'=>array(
......
'cache'=>array(
'class'=>'CDummyCache',
),
)