jon88 Posted October 15, 2014 Share Posted October 15, 2014 My first topic, hope will help somebody. Usage: For websites with more that one language. This modification will assing the language id (into ps_newsletter table) used by customers when they subscribe through block newsletter. One file to modify in modules/blocknewsletter/blocknewsletter.php 1. after: id_shop` INTEGER UNSIGNED NOT NULL DEFAULT \'1\', add: `language` INTEGER UNSIGNED NULL, 2. replace: $sql = 'INSERT INTO '._DB_PREFIX_.'newsletter (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active) VALUES ('.$this->context->shop->id.', '.$this->context->shop->id_shop_group.', \''.pSQL($email).'\', NOW(), with: $sql = 'INSERT INTO '._DB_PREFIX_.'newsletter (id_shop, id_shop_group, language, email, newsletter_date_add, ip_registration_newsletter, http_referer, active) VALUES ('.$this->context->shop->id.', '.$this->context->shop->id_shop_group.', '.$this->context->language->id.', \''.pSQL($email).'\', NOW(), 3. add language column in ps_newsletter ALTER TABLE `ps_newsletter` ADD `language` INT( 10 ) UNSIGNED NOT NULL Done! 2 Link to comment Share on other sites More sharing options...
nielsr Posted July 19, 2015 Share Posted July 19, 2015 Thanks a lot! This should be standard in the module! - Niels 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