andersburn Posted September 10, 2013 Share Posted September 10, 2013 (edited) The FollowUp modul is great - but I want to send the cancel-emails ones half an hour and the Bestcustomer-emails on sundays So I duplicated the modul, to have 2 cron-jobs, and that almost did it, but it doesn't work. I used the guide: http://www.leotheme.com/forum/20-general-pretashop-template-installation/1121-how-to-duplicate-module-prestashop.html When I save something in one of the 2 moduls I save the changes in both. So the Database is the same, how do I make sure that one of the moduls uses a different DB ? My shop is: Mackabler.dk And the code i'm trying to change is: public function install() { $logEmailTable = Db::getInstance()->execute(' CREATE TABLE '._DB_PREFIX_.'log_email ( `id_log_email` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `id_email_type` INT UNSIGNED NOT NULL , `id_cart_rule` INT UNSIGNED NOT NULL , `id_customer` INT UNSIGNED NULL , `id_cart` INT UNSIGNED NULL , `date_add` DATETIME NOT NULL, INDEX `date_add`(`date_add`), INDEX `id_cart`(`id_cart`) ) ENGINE='._MYSQL_ENGINE_); foreach ($this->confKeys AS $key) Configuration::updateValue($key, 0); Configuration::updateValue('PS_FOLLOWUP_SECURE_KEY', strtoupper(Tools::passwdGen(16))); return parent::install(); } Edited September 10, 2013 by andersburn (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 10, 2013 Share Posted September 10, 2013 you need to change database name and all queries to use new name. moreover, in configuration functions (COnfiguration::updateValue etc.) you have to use different values of settings too Link to comment Share on other sites More sharing options...
andersburn Posted September 16, 2013 Author Share Posted September 16, 2013 Do you know how? I've tried just changing all values to xxx02 but that just made a mistake `id_log_email02` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `id_email_type02` INT UNSIGNED NOT NULL , And so on. But: (I don't se a database name in there? ) foreach ($this->confKeys AS $key) Configuration::updateValue($key, 0); Configuration::updateValue('PS_FOLLOWUP_SECURE_KEY', strtoupper(Tools::passwdGen(16))); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now