Search the Community
Showing results for tags 'block newsletter language'.
-
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!