Jump to content

Search the Community

Showing results for tags 'Customer Registration'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Marketplace
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 18 results

  1. I need to add an input file uploader in customer registration (see the jp). Indeed, my customers need to proove that they are pros to access the website content. This field would be required to validate their account creation. I've spend about 3 days (dealing with authentification.tpl, customer.php overriding...) but still don't know how. Please, help xx
  2. Hello, i have an issue enabling or migrating or nesting or adding the Address Form into the registration form. so the user at registration need to send FULL Data, instead of waiting till need to checkout. in old versions i saw in preferences > customer> account creation or account creation + address i am using 1.7.6.2 and can't find such toggle to enable it or a way to nest it
  3. Someone is sending spam emails using my customer sign up. They are signing up as a new customer and sending spam through the welcome email that the site sends out. I am running Prestashop 1.6.1.19. Does anyone know how to stop it? I have disabled the welcome email but this isn't ideal. Any ideas? Many thanks, Stephen
  4. Hello, I am facing some strange message when customer is registrating him self going from the shopping cart. Customer can fill in all datas in Checkout without registration or Customer registration, but when he press CONFIRM, there is white page beginning with word Array. In the fact registration is done in the system, but customer does not know what to do and not finish order. It is strange because it was working few days ago, I did not make any update of Prestashop and did not change any code. Can you help please. Message is in the attachment. Thank you in advance David
  5. Hi, I have created a module for Prestashop v1.5- v1.6 that makes customers inactive after registration so that the admin must enable them in the backend. Also in its configuration there is an option to redirect the customers to one cms page that you may have created. Probably an informative message with instructions.. Feel free to customize. Enjoy!!! Note: Beware with the use of this module, since if you already have an override of the class Customer and of the AuthController, theywill be deleted. activatecustomer.zip
  6. Personalizados Campos en PrestaShop página de registro Este módulo de campos personalizados de registro por PrestaShop fmemodules le permite añadir campos adicionales ilimitadas en la página de registro de su tienda Prestashop. Esta extensión le permite añadir campo de texto, área de texto, Fecha, Mensaje Solo, Desplegable, Selección múltiple, sí / no, y / verificación campos del cuadro de Radiocomunicaciones. Para más información, visita este signo hasta campos de página PrestaShop
  7. Hiyas! Id like to know how to modify the 1.6 shop so that Our company could check the registrator. Our shop is for resellers and we dont wanna allow consumers to register and buy or see the resellers prices. I set the options on Prefrences--customers--general at "Registration process type" to "only account creation". Is this option so they cant order directly after registration? And so we can validate the registrant and after improving the customer we could send them the password etc....? Ansku
  8. Dear friends, In prevoius versions of prestashop, i used the "hack" bellow to have Welcome email send to customers, if the customer account is created from backoffice. Is not about to send an email about activation, is about the welcome email (with the account login details). The hack is ( in AdminCustomers.php - near 166 line) / Default behavior (save and back) Tools::redirectAdmin($currentIndex.($parent_id ? '&'.$this->identifier.'='.$object->id : '').'&conf=3&token='.$this->token); Add this two lines: if (!Mail::Send((int)(2), 'account', Mail::l('Welcome!'), array('{firstname}' => Tools::getValue('firstname'), '{lastname}' => Tools::getValue('lastname'), '{email}' => Tools::getValue('email'), '{passwd}' => Tools::getValue('passwd')), Tools::getValue('email'), Tools::getValue('firstname').' '.Tools::getValue('lastname'))) $this->errors[] = Tools::displayError('Cannot send email'); Now in prestashop 1.6.0.8, i cant get it to work. I will be forever grateful if someone point me in the right direction to have this option working again, because is important for me. Can be "hack" or module. With anticipated thanks
  9. Hi there, Need a Little help here... I have enabled the "One page checkout" and i causes some problems (well one major problem): When a new customer has to create an account, and fill in all required data, and afterwards click "Save".. it is still not possible to see and select payment methods. The "payment" block only sais "Please login to see payment methods"... but the "newly" created user IS logged in ... I only have one shipping possibility and this one is selected as defaut... but if i "select" it Again, the payment methods appears... but users wont select it if it already is.... Does anyone know how to fix this issue ?? Thanks. Kind regards Morten
  10. A few months ago, I made some changes in prestashop (can not remember if it was for a module or modifying any of the controllers) where if you register as a customer through an internal link a URL parameter. This allowed. - Register as a customer (nothing out of the ordinary) - Once registration is complete, instead of redirecting to "my account", then the controller (or module) redirected to my module. On the other hand, if only you sign up as a customer, you redirected directly to "my account". In short. Someone can me or have any idea how to help? I do not remember how I did it, nor do I have a backup to go back to back. (disastrous, I'm starting to do backups and versioning from today): P Example or url: www.mistore.com/index.php?source=plumber&back=module-blockcollaborate-verify (this when you register)
  11. I have a site www.godlyplaymaterials.com which has been live since November 2013. Now suddenly customer registration is not possible except from a small group of countries in the EU. All zones and countries are enabled, but it has no effect to the menu. I only have 3 default customer groups, so that should not be the problem. At the same time, all carriers for countries outside EU seem to have disappeared. Please can someone help - I don't know where to look for an error anymore, and I cannot get any orders in because customers cannot register! -Johanna
  12. I am struggling with modifying some code in Customer registration management module. For some reason, Instant checkout is not working the way it should. When the Customer registration management module is disabled, the Instant Checkout is working fine, on submit and with no errors we go to the next step/screen. When Customer registration module is enabled, once we click on submit button under Instant checkout, we do not go to the next step/screen, instead we come back to the same screens, forms empty, and in url we have this: authentication?back=order.php%3Fstep%3D1 I think there is something in customerregistration.php, which is causing this, but cannot understand the code that well, so I don't know how and what to modify in order to make Instant checkout work. I would really appreciate it if somebody could explain the way this works, so I can then maybe try and modify the code myself. Please help me to resolve this issue. the code from customerregistration.php: <?php class customerRegistration extends Module { const __MAIL_DELIMITOR__ = ','; function __construct() { $this->name = 'customerregistration'; $this->tab = 'Tools'; $this->version = 2.0; parent::__construct(); // The parent construct is required for translations $this->page = basename(__FILE__, '.php'); $this->displayName = $this->l('Customer registration management'); $this->description = $this->l('This module allows to validate customer registration from the front office'); $this->_isCustomerRegistredByDefault = intval(Configuration::get('CUSTREG_IS_REGISTERED_BY_DEFAULT')); $this->_sendAdminMail = intval(Configuration::get('CUSTREG_SEND_ADMIN_MAIL')); $this->_mails = Configuration::get('CUSTREG_MAILS'); $this->_defaultGroups = explode (';', Configuration::get('CUSTREG_GROUPS')); $this->_registrationCode = Configuration::get('CUSTREG_REGISTRATION_CODE'); $this->_askPrivilegeAccess = Configuration::get('CUSTREG_ASK_PRIVILEGE_ACCESS'); } function install() { if (!parent::install()) return false; if (!$this->registerHook('authentication') or !$this->registerHook('createAccountForm') or !$this->registerHook('createAccount') or !$this->registerHook('backOfficeHome') or !$this->registerHook('adminCustomers')) return false; Configuration::updateValue('CUSTREG_IS_REGISTERED_BY_DEFAULT', 0); Configuration::updateValue('CUSTREG_SEND_ADMIN_MAIL', 1); Configuration::updateValue('CUSTREG_MAILS', Configuration::get('PS_SHOP_EMAIL')); Configuration::updateValue('CUSTREG_GROUPS', '1'); $tab = new Tab(); $tab->id_parent = 2; $tab->name = array(Language::getIdByIso('en') =>'Pending', Language::getIdByIso('fr') =>'En attente'); $tab->class_name = 'AdminPendingCustomers'; $tab->module = 'customerregistration'; $tab->add(); $query = 'CREATE TABLE '._DB_PREFIX_.'approvedcustomer ( `id_customer` int(2) NOT NULL, `is_approved` int(2) NOT NULL, `privilege_request` int(2) NOT NULL, `privilege_message` text, `date_add` datetime NOT NULL, `date_upd` datetime NOT NULL, PRIMARY KEY (`id_customer`)) ENGINE=MyISAM default CHARSET=utf8'; if (!Db::getInstance()->Execute($query)) return false; return true; } function uninstall() { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); $allNotApproved = ApprovedCustomer::getAllNotApproved(); foreach ($allNotApproved as $approvalLine) { $customer = new Customer($approvalLine['id_customer']); $customer->delete(); } Configuration::deleteByName('CUSTREG_SEND_ADMIN_MAIL'); Configuration::deleteByName('CUSTREG_MAILS'); Configuration::deleteByName('CUSTREG_IS_REGISTERED_BY_DEFAULT'); Configuration::deleteByName('CUSTREG_GROUPS'); $tab = new Tab(Tab::getIdFromClassName ('AdminPendingCustomers')); if (! $tab->delete()) return false; if (!parent::uninstall()) return false; return Db::getInstance()->Execute('DROP TABLE '._DB_PREFIX_.'approvedcustomer'); } function hookAuthentication() { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); global $cookie; $approved = ApprovedCustomer::isApproved ($cookie->id_customer); if (! $approved) { //you need add here $cookie->id_customer = 0; $cookie->logged = 0; $_POST['back'] = 'modules/customerregistration'.'/messages.php?msg=wait'; } } function hookCreateAccountForm($params) { global $smarty, $link; $smarty->assign(array( 'isRegistrationCodeManaged' => (($this->_registrationCode <>'') ?true : false), 'isPrivilegedManaged' => (($this->_askPrivilegeAccess == 1) ?true : false) )); return $this->display(__FILE__, 'registryForm.tpl'); } function hookCreateAccount($params) { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); global $cookie, $back; $registration_code = pSQL(Tools::getValue('registration_code')); if ($registration_code != '' AND $registration_code == $this->_registrationCode) { $customer = $params['newCustomer']; $customer->cleanGroups(); $customer->addGroups ($this->_defaultGroups); } $cookie->logged = $this->_isCustomerRegistredByDefault; $cust = $params['newCustomer']; $approval = new ApprovedCustomer($cust->id); $approval->is_approved = $this->_isCustomerRegistredByDefault; $approval->privilege_request = intval(Tools::getValue('privilege_request'),0); $approval->privilege_message = pSQL(Tools::getValue('privilege_message'), '');; if (! $approval->save()) Tools:('Unable to save approval information'); if ($this->_sendAdminMail) $this->sendMail('pending_registration', array('customer' => $cust, 'approval'=>$approval)); if (! $approval->is_approved) { $back = 'modules/'.basename(__FILE__, '.php').'/messages.php?msg=noconnect&back=my-account.php'; $cookie->logged = 0; $cookie->id_customer = 0; } elseif ($back == '') $back = 'my-account.php'; } function hookAdminCustomers($params) { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); global $cookie; $id_customer = intval($params['id_customer']); $isApproved = ApprovedCustomer::isApproved ($id_customer); $txt = '<p>'.$this->l('Customer registration').' : '; if ($isApproved) { $txt .= $this->l('Validated'); } else { $token = Tools::getAdminToken('AdminPendingCustomers'.intval(Tab::getIdFromClassName('AdminPendingCustomers')).intval($cookie->id_employee)); $txt .= '<a href="?tab=AdminPendingCustomers&approvecustomer&id_customer='.$id_customer.'&token='.$token. '&back='.urlencode($_SERVER['REQUEST_URI']).'"><span class="button">'.$this->l('Validate').'</span></a>'; $txt .= '<a href="?tab=AdminPendingCustomers&refusecustomer&id_customer='.$id_customer.'&token='.$token. '"><span class="button">'.$this->l('Refuse').'</span></a>'; } $txt .= '</p> <p>'.$this->l('Privilege access').' : '; $approvalInfos = ApprovedCustomer::getPrivilegeRequest ($id_customer); switch ($approvalInfos['privilege_request']) { case 0: /* no request */ $txt .= $this->l('Not requested'); break; case 1: /* requested */ $token = Tools::getAdminToken('AdminPendingCustomers'.intval(Tab::getIdFromClassName('AdminPendingCustomers')).intval($cookie->id_employee)); $txt .= '<a href="?tab=AdminPendingCustomers&id_customer='.$id_customer.'&approveprivilegecustomer&token='.$token.'&back='.urlencode($_SERVER['REQUEST_URI']).'" ><img src="../img/admin/enabled.gif"></a>'; $txt .= '<a href="?tab=AdminPendingCustomers&id_customer='.$id_customer.'&refuseprivilegecustomer&token='.$token.'&back='.urlencode($_SERVER['REQUEST_URI']).'" ><img src="../img/admin/disabled.gif"></a>'; break; case 2: /* granted */ $txt .= $this->l('Granted'); break; case 3: /* refused */ $txt .= $this->l('Refused'); break; default: /* unknown */ $txt .= $this->l('Not requested'); } if (isset($approvalInfos['privilege_message']) AND $approvalInfos['privilege_message'] <> '') { $txt .= '<p>'.$this->l('Message').' :<br/><textearea cols="26" rows="3">'.$approvalInfos['privilege_message'].'</textearea></p>'; } $txt .= '</p>'; return '<h2>'.$this->l('Registration').'</h2><fieldset style="width: 400px"> '.$txt . ' </fieldset> <div class="clear"> </div>'; } function hookBackOfficeHome () { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); global $cookie; $allNotApproved = ApprovedCustomer::getAllNotApproved(); $nbCustomers = sizeof ($allNotApproved); $txt = ''; $txt .= '<div class="clear space"><br /><br /></div><fieldset class="width3"><legend>'. $this->l('Pending customer registration').'</legend>'; $txt .= $this->l('Number of customers waiting for registration : '); if ($nbCustomers == 0) $txt .= '<b>'.$this->l('None').'</b>'; else $txt .= '<b>'.$nbCustomers.'</b> <a href="?tab=AdminPendingCustomers&configure=customerRegistration&token='.Tools::getAdminToken('AdminPendingCustomers'.intval(Tab::getIdFromClassName('AdminPendingCustomers')).intval($cookie->id_employee)).'"><span class="button">'.$this->l('View').'</span></a>'; $txt .= '</fieldset><br/>'; return $txt; } function _display_config () { global $cookie; require_once (dirname(__FILE__).'/ApprovedCustomer.php'); $this->_html .= '<form action="'.$_SERVER['REQUEST_URI'].'" method="post"><fieldset style="width: 700px"><legend>'.$this->l('Settings').'</legend>'; $this->_html .= ' <p>'.$this->l('You can choose if customers are registrered by default or blocked until admin validation.').'<br>'. $this->l('Depending of the option, use appropriate mail template to be sent to customers.').'</p> <label>'.$this->l('Registered by default :').'</label> <div class="margin-form"> <input type="radio" name="is_default_registered" id="is_default_registered_on" value="1" '.(($this->_isCustomerRegistredByDefault) ? 'checked="checked" ' : '').'/> <label class="t" for="is_default_registered_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" /></label> <input type="radio" name="is_default_registered" id="is_default_registered_off" value="0" '.((!$this->_isCustomerRegistredByDefault) ? 'checked="checked" ' : '').'/> <label class="t" for="is_default_registered_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" /></label> </div> <br /> <p>'.$this->l('An email can be sent to administrator on new pending customer registration').'</p> <label>'.$this->l('Send e-mail :').'</label> <div class="margin-form"> <input type="radio" name="mail_active" id="mail_active_on" value="1" '.(($this->_sendAdminMail) ? 'checked="checked" ' : '').'/> <label class="t" for="mail_active_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" /></label> <input type="radio" name="mail_active" id="mail_active_off" value="0" '.((!$this->_sendAdminMail) ? 'checked="checked" ' : '').'/> <label class="t" for="mail_active_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" /></label> </div> <label>'.$this->l('E-mail adresses :').'</label> <div class="margin-form"> <textarea name="mails" rows="4" cols="40">'.str_replace(self::__MAIL_DELIMITOR__, "\n", $this->_mails).'</textarea> <p>'.$this->l('One e-mail address per line').'</p> </div> <div class="margin-form"> <input type="submit" value="'.$this->l('Update').'" name="update" class="button" /> </div> </fieldset>'; $this->_html .= ' <br/> <fieldset style="width: 700px"><legend>'.$this->l('Associated groups').'</legend>'; $this->_html .= '<p>'. $this->l('Customer registering with the given registration code will automatically be affected to the specified groups') .'<br/>'.$this->l('Let empty to disable this feature') .'</p>'; $this->_html .= '<label>'.$this->l('Privilege request :').'</label> <div class="margin-form"> <input type="radio" name="ask_privilege_access" id="ask_privilege_access_on" value="1" '.(($this->_askPrivilegeAccess) ? 'checked="checked" ' : '').'/> <label class="t" for="ask_privilege_access_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Yes').'" title="'.$this->l('Yes').'" /></label> <input type="radio" name="ask_privilege_access" id="ask_privilege_access_off" value="0" '.((!$this->_askPrivilegeAccess) ? 'checked="checked" ' : '').'/> <label class="t" for="ask_privilege_access_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('No').'" title="'.$this->l('No').'" /></label> </div>'; $this->_html .= '<br/><label>'.$this->l('Registration code :').'</label> <div class="margin-form"> <input type="text" name="registration_code" value="'.$this->_registrationCode.'" style="width: 300px;" /> </div> <label>'.$this->l('Groups:').' </label> <div class="margin-form">'; $groups = Group::getGroups($cookie->id_lang, true); if (sizeof($groups)) { $this->_html .= ' <table cellspacing="0" cellpadding="0" class="table" style="width: 29.5em;"> <tr> <th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'groupBox[]\', this.checked)" /></th> <th>'.$this->l('ID').'</th> <th>'.$this->l('Group name').'</th> </tr>'; $irow = 0; foreach ($groups as $group) { $this->_html .= ' <tr class="'.($irow++ % 2 ? 'alt_row' : '').'"> <td>'.($group['id_group'] != 1 ? '<input type="checkbox" name="groupBox[]" class="groupBox" id="groupBox_'.$group['id_group'].'" value="'.$group['id_group'].'" '.(in_array($group['id_group'], $this->_defaultGroups) ? 'checked="checked" ' : '').'/>' : '').'</td> <td>'.$group['id_group'].'</td> <td><label for="groupBox_'.$group['id_group'].'" class="t">'.$group['name'].'</label></td> </tr>'; } $this->_html .= ' </table> <p style="padding:0px; margin:10px 0px 10px 0px;">'.$this->l('Mark all checkbox(es) of groups to which the customer is to be member').'</p> '; } else $this->_html .= '<p>'.$this->l('No group created').'</p>'; $this->_html .= '</div> <div class="margin-form"> <input type="submit" value="'.$this->l('Update').'" name="update" class="button" /> </div> </fieldset> </form><br>'; } function getContent () { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); global $cookie; $this->_html = ''; if (!empty($_POST)) { $this->_postValidation(); if (!sizeof($this->_postErrors)) $this->_postProcess(); else foreach ($this->_postErrors AS $err) $this->_html .= '<div class="alert error">'.$err.'</div>'; } $this->_display_config (); /* Table clean-up : remove all entries for which the customer has already been deleted from customer table */ Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'approvedcustomer` WHERE `id_customer` not in (SELECT a.id_customer from `'._DB_PREFIX_.'customer` a)'); return $this->_html; } private function _postProcess() { $this->_isCustomerRegistredByDefault = intval(Tools::getValue('is_default_registered', false)); Configuration::updateValue('CUSTREG_IS_REGISTERED_BY_DEFAULT', $this->_isCustomerRegistredByDefault); $this->_sendAdminMail = intval(Tools::getValue('mail_active')); Configuration::updateValue('CUSTREG_SEND_ADMIN_MAIL', $this->_sendAdminMail); $this->_askPrivilegeAccess = intval(Tools::getValue('ask_privilege_access')); Configuration::updateValue('CUSTREG_ASK_PRIVILEGE_ACCESS', $this->_askPrivilegeAccess); $this->_registrationCode = pSQL(Tools::getValue('registration_code')); Configuration::updateValue('CUSTREG_REGISTRATION_CODE', $this->_registrationCode); $mails = explode("\n", $_POST['mails']); $this->_mails = ''; foreach ($mails as $mail) $this->_mails .= trim($mail).self::__MAIL_DELIMITOR__; $this->_mails = trim($this->_mails, self::__MAIL_DELIMITOR__); Configuration::updateValue('CUSTREG_MAILS', $this->_mails); $this->_defaultGroups = Tools::getValue('groupBox'); if (is_array($this->_defaultGroups)) $this->_defaultGroupsString = '1;'.implode(';', $this->_defaultGroups); else $this->_defaultGroupsString = '1'; Configuration::updateValue('CUSTREG_GROUPS', $this->_defaultGroupsString); $this->_html .= '<div class="conf">'.$this->l('Settings updated').'</div>'; } private function _postValidation() { if (!isset($_POST['mails']) OR empty($_POST['mails'])) $this->_postErrors[] = $this->l('No e-mail addresses specified'); else { $mails = explode("\n", $_POST['mails']); foreach ($mails as $mail) { $mail = trim($mail); if (!empty($mail) AND !Validate::isEmail($mail)) $this->_postErrors[] = $this->l('Invalid e-mail: ').$mail.'.'; } } } public function sendMail ($mailName, $params) { require_once (dirname(__FILE__).'/ApprovedCustomer.php'); switch ($mailName) { case 'customer_registration_ok': $id_customer = intval($params['id_customer']); if ($id_customer <> 0) { $user = new Customer ($id_customer); Mail::Send(intval(Configuration::get('PS_LANG_DEFAULT')), 'customer_registration_ok', $this->l('Your account is activated'), array('{firstname}' => $user->firstname, '{lastname}' => $user->lastname, '{email}' => $user->email, '{passwd}' => $this->l('Already sent')), $user->email, NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); } break; case 'pending_registration': $customer = $params['customer']; $approval = $params['approval']; $template = 'pending_registration'; if ($approval->privilege_request) $subject = $this->l('New customer with privilege access waiting for registration'); else $subject = $this->l('New customer waiting for registration'); $templateVars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{privilege_request}' => (($approval->privilege_request) ?$this->l('YES') :$this->l('NO') ) ); $dest = split(self::__MAIL_DELIMITOR__, $this->_mails); if (!Mail::Send(intval(Configuration::get('PS_LANG_DEFAULT')), $template, $subject, $templateVars, $dest, NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__).'/mails/') ) { //die('Send Mail Failed'); } break; case 'customer_privilege_ok': $id_customer = intval($params['id_customer']); if ($id_customer <> 0) { $user = new Customer ($id_customer); Mail::Send(intval(Configuration::get('PS_LANG_DEFAULT')), 'customer_privilege_ok', $this->l('Privilege access granted'), array('{firstname}' => $user->firstname, '{lastname}' => $user->lastname, '{email}' => $user->email, '{passwd}' => $this->l('Already sent')), $user->email, NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); } break; } } } ?>
  13. Hi, I cant seem to figure out how to add to the address requirements in country settings. Currently I have City as a required field. I would like to change the name to City/Suburb. How do we add a new item in the list on the right to be added to the required address fields? Any help would be appreciated. Thanks.
  14. I upgraded Prestashop 1.4.0 to 1.5.4.1 and after upgrade i am getting following problem. After create new account on front office when i am click on my address i can see old customer address. When check new account in back office then i realize that New account linked to existing customer. Anyone can help me to fix this bug. Regards
  15. For my site I am trying to add a field in the customer registration. I want a field that asks the customer for an ID number. I have looked for hours and hours and I have found nothing that will work in Prestashop 1.5. I have found several topics about previous versions but each of tutorials I follow do not match in Prestashop 1.5. I also looked to see if there were any modules that would do this for me. No luck. So if anyone knows how to do this or knows of a module that does this I would be greatly appreciative!. - Thanks
  16. Hola Comunidad! he estado buscando por días sin resultado alguno, un modulo gratuito para la versión 1.4.7, que cuando un cliente se registre, se le mande un correo con un link de activación de cuenta, mientras tanto, este no pueda accesar a su cuenta sin antes no haber confirmado. Les agradecería su ayuda.
  17. Testat pe Prestashop v.1.3, v.1.4. Vom arata in acest tutorial cum puteti crea campuri noi in pagina de creare cont in magazinele Prestashop. In cazul nostru este vorba despre cele mai cautate campuri de catre proprietarii de magazine online din Romania, cele necesare pentru Inregistrare Firme, si anume: CUI, Nr.Reg.Com, Banca si IBAN. Puteti aplica aceasta metoda pentru a crea orice si oricate campuri doriti. Aplicarea acestei metode necesita cunostinte minime de PHP SI MySql. Demo Tutorialul poate fi gasit aici: Custom Fields on Customer Registration Prestashop
  18. this module is shifted to a new topic as a new module has been remade http://www.prestashop.com/forums/topic/177802-module-customer-registration-activation-through-email/
×
×
  • Create New...