flagrags Posted January 2, 2012 Share Posted January 2, 2012 Hi I would like to add the question "How did you hear about us?" when customers create an account. I did this by adding the question to the authentication.tpl and it now shows on the website, however it doesn't show the answer in the back office. How do I include this information in the customer profile on my back office. Would really appreciate any advice Thanks Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 2, 2012 Share Posted January 2, 2012 Hi flagrags, Can you please post your URL so that we can check this out for you? -Mike Link to comment Share on other sites More sharing options...
ZenGraph Posted January 2, 2012 Share Posted January 2, 2012 Hello for that you need to make some changes .. the best will be to develop a module for that ^^ Well, here is the dirty way :> add a new line on your database with 2 columns : Client_ID & Hdyeau for example declare a new variable in classes and manage to send it to database when it is filled by the client and his registration complete. Now to be able to see that info without using phpmyadmin you need to modify the backoffice files of products display to show that new variable. something like this should work.. but doing it on a nice way with a special hook for that will be much better.. for avoiding updates problems mostly. Best Regards, Zen PS: sorry for my bad english Link to comment Share on other sites More sharing options...
flagrags Posted January 2, 2012 Author Share Posted January 2, 2012 hi thanks for your replies www.flag-rags.com My knowledge in this area is very limited to anymore information you could give would be greatly appreciated! Thanks Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 2, 2012 Share Posted January 2, 2012 Hi flagrags, Can you please post (or PM me) the modifications you made, and also please check your database to see if the information is populating there for your customers? -Mike Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 2, 2012 Share Posted January 2, 2012 Hi flagrags, We took a look at this for you, and as ZenGraph mentioned above, you still need to declare your "heard" variable for it to be properly written into your database. Right now, that piece of code is calling for a variable that has not yet defined, and since PrestaShop never studied Algebra, it isn't really configured to "Solve for X" . In this case, what you will need to do is declare it in your classes/customer.php file, so that your site knows where to look when it is presented with the "heard" variable. I hope this helps. -Mike Link to comment Share on other sites More sharing options...
Wingz Posted January 2, 2012 Share Posted January 2, 2012 Flgarags ... There's an excellent free (at the moment) module for this; http://sites.google.com/site/phrasespot/home/modules Put your original file back in and use the above; works a treat. Link to comment Share on other sites More sharing options...
flagrags Posted January 3, 2012 Author Share Posted January 3, 2012 Hi Ok have gone into the customer.php file. I added: /** @var string Heard */ public $heard; But still not showing in my back office. Do I need to add something to this section too: public function getFields() { parent::validateFields(); if (isset($this->id)) $fields['id_customer'] = intval($this->id); $fields['secure_key'] = pSQL($this->secure_key); $fields['id_gender'] = intval($this->id_gender); $fields['id_default_group'] = intval($this->id_default_group); $fields['lastname'] = pSQL($this->lastname); $fields['firstname'] = pSQL($this->firstname); $fields['birthday'] = pSQL($this->birthday); $fields['email'] = pSQL($this->email); Thanks! Link to comment Share on other sites More sharing options...
ZenGraph Posted January 3, 2012 Share Posted January 3, 2012 hello again flagrags it seems that you don't really know how php/mysql works and how to deal with that.. so I recommand you to use this module that Wingz show up above. That will be the Best Solution for you and others, you don't have to touch the core that way, and all the job is already done ! Best regards, Zen Link to comment Share on other sites More sharing options...
flagrags Posted January 3, 2012 Author Share Posted January 3, 2012 Hi Wingz Thanks for your post I went on your link but it said I didn't have permission to access??? Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 3, 2012 Share Posted January 3, 2012 Hi flagrags, I am going to reach out to phrasespot, the developer of this module who is very active here on the forums. I'll have him pop directly onto this thread to help you out. -Mike 1 Link to comment Share on other sites More sharing options...
flagrags Posted January 3, 2012 Author Share Posted January 3, 2012 Thanks Mike appreciate it Link to comment Share on other sites More sharing options...
phrasespot Posted January 3, 2012 Share Posted January 3, 2012 The modules are going through update to add year 2012 in licence texts. They will be available in a day or two, please try again later. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 3, 2012 Share Posted January 3, 2012 Thanks for the info phrasespot! -Mike Link to comment Share on other sites More sharing options...
phrasespot Posted January 5, 2012 Share Posted January 5, 2012 I went on your link but... The module is available for download now. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 5, 2012 Share Posted January 5, 2012 Thanks for the update! flagrags, I hope you get a chance to download this now! -Mike Link to comment Share on other sites More sharing options...
flagrags Posted January 6, 2012 Author Share Posted January 6, 2012 I actually have prestashop 1.3.4 which I don't think is compatible with this module, is there an older version of this for me to install? Thanks Link to comment Share on other sites More sharing options...
guillenqn Posted May 28, 2012 Share Posted May 28, 2012 I'm looking for the same module, but the links are not available any more. Any updates? Link to comment Share on other sites More sharing options...
gypsy Posted January 4, 2013 Share Posted January 4, 2013 where can i find this module? Link to comment Share on other sites More sharing options...
Recommended Posts