Override the my-account.tpl template file when install the module that I have created in prestashop 1.6, - prestashop-1.6

I have created a custom module in prestashop, I just need to Override the my-account.tpl template file when I install the module, that module I have created custom. I don't have any idea how to do that.can somebody help me out of this.

Try with :
/* INSTALL */
#copy('../themes/'._THEME_NAME_.'/my-account.tpl','../themes/'._THEME_NAME_.'/my-account.tplback'); //Backup file
#copy('../modules/NOMDUMODULE/my-account.tpl','../themes/'._THEME_NAME_.'/my-account.tpl'); //Install new file
/*DESINSTALL*/
#unlink('../themes/'._THEME_NAME_.'/my-account.tpl'); //Delete file
#copy('../themes/'._THEME_NAME_.'/my-account.tplback','../themes/'._THEME_NAME_.'/my-account.tpl'); //Restor file
Regards

Related

Should I use my package name for KMM SqlDelight config?

I am following this guide and in the first section of this step I have to do the following:
sqldelight {
database("AppDatabase") {
packageName = "com.jetbrains.handson.kmm.shared.cache"
}
}
Question is, should I use .handson. or .myPackageName. and why?
As guide from your link says
The packageName parameter specifies the package name for the generated Kotlin sources.
As with any kotlin file, you can specify any package name you want, but a good practice is to put all the files in the same module under the module package.
Let's say your module has the package name com.app.modules.shared. You can use the same package name for the generated database or some sub-path such as com.app.modules.shared.database.

How to use FFmpeg Library in iOS Swift?

I have integrated FFmpeg Library in Xcode successfully. But I don’t know, how to use it, how to run FFmpeg commands?? If anyone has any example of how to use it. That'd be really appreciated.
I have integrated it by following this guide.
Any help will be highly appreciated. Thanks
Here is my resolution. I hope it can work for you.
Assuming you has integrated FFmpeg Library in Xcode successfully.
First, Create a header file named "avcodec_shim.h":
//avcodec_shim.h
#pragma once
#include "libavcodec/avcodec.h"
Second, Create a empty file with a fixed name "module.modulemap":
module CFFmpeg [system] {
module AVCodec {
header "avcodec_shim.h"
link "avcodec"
export *
}
module AVFormat {
header "avformat_shim.h"
link "avformat"
export *
}
.....
}
Third, Go to "TARGET"->"Build Setting", and set "Import Paths" as the ABSOLUTELY PATH OF FOLDER containing "module.modulemap" file. NOTE: not the file absolutely path.
Final, Import the module using "import CFFmpeg", and using FFmpeg APIs as usual.

How do i user open office in zf2 project

i have included the openoffice downloaded file to vendor folder, but i'm unable to access it and it when i do
$odf = new \Openoffice_Odf($templatePath, array('CLEAN_REMAINING_VARS' => true));
it gives me the error
Class 'Openoffice_Odf' not found
I think, you need to include it inside your script using include_path
require VENDOR_PATH.'OpenOffice/Odf.php';
or using a spl_autoloader

eclipse scout neon : Texts in extended project

I have extended project in eclipse scout neon, and I would like to know how to enable texts it this project.
I copy Texts.nls file and create texts folder with Texts.properties inside.
Auto create texts from code doesn't work and give me an error :
The NLS Project is read-only. heck that you have a valid NLS Project in your workspace.
If I add text manually in texts.properties file, it doesn't read from it.
How to fix this?
Have you configured your Texts.nls file correctly? Here an example:
###############################################
# This file is maintained by the NLS editor. #
# To ensure a properly working NLS support #
# keep this file untouched. #
###############################################
Nls-Class=org.eclipse.scout.contacts.shared.TextProviderService
The corresponding TextProviderService java class:
package org.eclipse.scout.contacts.shared;
import org.eclipse.scout.rt.platform.Order;
import org.eclipse.scout.rt.shared.services.common.text.AbstractDynamicNlsTextProviderService;
#Order(2000)
public class TextProviderService extends AbstractDynamicNlsTextProviderService {
#Override
protected String getDynamicNlsBaseName() {
return "org.eclipse.scout.contacts.shared.texts.Texts";
}
}
This is the way how the Scout SDK lookup for your properties files.

Failed to open - Zend Framework

Warning: require_once(Zend/Application.php) [function.require-once]:
failed to open stream: No such file or directory in
D:\xampp\htdocs\obsessa\public\index.php on line 17
Fatal error: require_once() [function.require]: Failed opening
required 'Zend/Application.php'
(include_path='D:\xampp\htdocs\obsessa\library;.;D:/xampp/php/PEAR;D:/xampp/php/ZendFramework')
in D:\xampp\htdocs\obsessa\public\index.php on line 17
Hi Anyone help me on this ?
D:/xampp/php/PEAR;D:/xampp/php/ZendFramework
Should probably be:
D:/xampp/php/PEAR;D:/xampp/php/ZendFramework/library
The immediate problem is that your php include_path configuration is wrong. The reason is the way PSR-0 autoloading works. Your include path has two paths. If you want to load Zend\Application, then you need an include path that has a subdirectory called 'Zend'. In your case, D:/xampp/php/ZendFramework does not have that, you need D:/xampp/php/ZendFramework/library (which has a subdirectory named Zend, which has a file named Application.php)
But really, if you're doing ZF2, grab the skeleton application and use composer, just like the docs say, especially if you're new. composer is fantastic, and it's the preferred way to go. With composer, each application you write has its own installation of zf2. There are very few situations where you want your apps to rely on some globally-installed framework, which is the setup you're trying to do.
Please follow this step :
Please donwload the zend libray from zend official site
http://framework.zend.com/
Then paste donwloaded library in zend libray folder
Index.php file settings
//Ensure library/ is on include_path
set_include_path(
implode(PATH_SEPARATOR,
array(realpath(APPLICATION_PATH . '/../library'),
get_include_path(),)));
/** Zend_Application */
require_once 'Zend/Application.php';
please set index.php file as:
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(FILE) . '/../application'));
defined('LIBRARY_PATH')
|| define('LIBRARY_PATH', realpath(dirname(FILE) . '/../library'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
define('PUBLIC_PATH','http://'.$_SERVER['HTTP_HOST'].'/demo/public');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
set_include_path(implode(PATH_SEPARATOR, array(
realpath(DOCTRINE_PATH),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();

Resources