Jump to content

Recommended Posts

  • Replies 274
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Download here for FREE   If your customer base is fairly large you might be responding to the very same questions about your products over and over again. This is where the free Prestashop module "A

This is a test version of the module for PS 1.7.x. The code has been changed only in part to work in PS 1.7.x. It works great on my localhost Includes Google reCAPTCHA GDPR consent

Just in case someone stumbles upon this awesome module and wants to make it work in tabs in PS 1.6 And like myself is not really versed in code   You may want your prestaqna.php look like the one o

Posted Images

Hi Nemo,
First of all congratulations on the module Q & As you have developed.It's fantastic!
I've installed it on two websites, one with prestashop 1.5.6 and another in 1.6.0.8. The problem I have with prestashop 1.6.0.8. I do not get to display the corresponding tab.

I compared the positions of the "hook" between prestashop and see nothing strange.
Could I help? The truth is I'm a little desperate ....

Thank you very much in advance
a greeting

Share this post


Link to post
Share on other sites
  • 4 weeks later...
  • 2 weeks later...

 Hi Nemo1,

 

 

      i have serious issue since i installed your module on PS1.6.0.9, i cannot change prices anymore!

 

      I tried to uninstall it but i still have tab "Prestaqna" in the back office when i try to modify a product

 

      and still cannot change price afterward.

 

      Please help my shop is in production.

 

      Thank you.

 

Edit: I cannot change prices and quantity even though i change in the back office there's
         no effect Pls help it's very urgent

Edited by rololo88 (see edit history)

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 2 months later...

Nice job but i can't place the module in tab. In modules position, i have these hooks: displayProductTab and displayProductTabContent but appears below the product tabs. How can i place the module in one tab?

 

Thanks and sorry for my english.

Share this post


Link to post
Share on other sites
  • 1 month later...

Nice job but i can't place the module in tab. In modules position, i have these hooks: displayProductTab and displayProductTabContent but appears below the product tabs. How can i place the module in one tab?

 

Thanks and sorry for my english.

 

Hi all, I have the same problem, how can solve?

  • Like 1

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Many thanks for awesome module improving feedback quality. 

Just test and think how to use it better.

Checked all comments in the topic as the below mentioned issues are still open for me.

 

1. Rejecting email  - is not sending actually.

Did not realise completely - how to edit prestaqna.php file to allow rejecting email? 

 

2. Regarding placing Q&A Module content and form  in the product tabs - if anybody know the solution - would be helpful

 

Dear Nemo1 !  

Many thanks again for the module, other contribution in the community and interesting article I read from Your Facebook & Twitter feeds.

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 3 weeks later...
  • 1 month later...

Nice module. But have one big bug: To customers emails send only BO language. So... if FO lang for example "fr" customer get email in "en" because BO lang is en.

If I change BO lang to "fr" customers get emails in "fr".

In table must be "lang" column, contains $this->context->language->id an update moment and
Mail::Send($this->context->language->id, 'qna_answered', $this->l('An answer to you question is available') must get lang from table

I have translated emails and module in 3 different langs. BO lang is en, and all customers geting emails about answers in en.

Edited by metacreo (see edit history)

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hello friends

 

Thank you very much for the module. How can change hook to displayProductButtons ?

 

I modified the next words in prestaqna.php but when I click in "Send question!" then the javascript input button don´t work and is impossible send message

 

productTabContent by displayProductButtons

hookProductTabContent by hookDisplayProductButtons

 

Somebody expert?

best regards

 

 

--------------------

It seem error is value id from prestaqna_tab_content.tpl :   value="{$smarty.get.id_product}"

Edited by seog (see edit history)

Share this post


Link to post
Share on other sites
  • 5 weeks later...

The module works fine...but it has one issue ---

 

THe content line used in the module is grammatically wrong and needs to be corrected...

 

"If you have has questions which is not answered about this add on""--- this gets plugged in to all product pages.

 

Few suggestions to change this :

 

" Add a button to select which category it needs to be plugged in"

 

Change the wording to suit as follows :

 

If you have any query/question feel free to ask here about this product. 

 

(this will be more correct and relevant as we are not selling addons and selling products on prestashop)

 

hope my suggestions are taken in a positive note for imporvement 

 

 

Vineet Girdhar

Content writer and prestashop Lover

 

 

Share this post


Link to post
Share on other sites
  • 1 month later...

Hello.

 

I love this module. Thank you very much for developing it and offering it for free.

 

I have a big problem, though. Everything works fine *except* that the customer does not receive the email that tells them their question has been answered. When I answer the question in the back office, it says "Error while sending the email to xxxxxx@gmail.com". I see that that other people have also had this problem.

 

I would like to please know if you have a solution to this problem. I cannot use this module until it is fixed. I am using PS 1.6.1.0.

 

Thank you.

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi,

 

Great module. I use PS 1.6.1.2 and everything works fine (site under testing).

1.

I need to implement Recaptcha.

 

I put code

<div class="form-group">
<div class="g-recaptcha" data-sitekey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></div>
                <input type="hidden" name="qna_prod" value="{$smarty.get.id_product}"/>

into /modules/prestaqna/views/templates/hook/prestaqna_tab_content.tpl

 

 

and code

<![endif]-->
<script src='https://www.google.com/recaptcha/api.js'></script>
    </head>

into /themes/default-bootstrap/header.tpl

 

Recaptcha is visible

I put all infos in "Ask a question" form (i want to know, e-mail)

i hit "Send question!" without recaptcha validation and:

 

"Thank you. Your question has been registered. You will be notified as soon as an answer is available"

 

How to solve my problem?

 

2.

Or how to put Slide Captcha code to this form (Ask a question) with

{include file="$tpl_dir./../../modules/slidecaptcha/views/templates/front/slidecaptcha.tpl"}

 

3.

Or how to put EiCaptcha on this form (Ask a question)

 

Sry for my english.

Edited by africanodama (see edit history)

Share this post


Link to post
Share on other sites
  • 1 month later...

Hello.

 

I love this module. Thank you very much for developing it and offering it for free.

 

I have a big problem, though. Everything works fine *except* that the customer does not receive the email that tells them their question has been answered. When I answer the question in the back office, it says "Error while sending the email to xxxxxx@gmail.com". I see that that other people have also had this problem.

 

I would like to please know if you have a solution to this problem. I cannot use this module until it is fixed. I am using PS 1.6.1.0.

 

Thank you.

Yes please fix that problem.

 

Thanks

  • Like 1

Share this post


Link to post
Share on other sites
  • 4 weeks later...
  • 4 weeks later...

@Nemo1

 

Fist off all thanks for publishing your module for free and the contribution to the community. 

 

I've always used your module in the 1.5 version to let customers request a free sample of our product. We recently updated our store to the 1.6 version. I made the modifications to make the product tabs like 1.5 as described on this github page. 

 

After installing the latest version of your Q&A module the section is displayed under the review tab. I already tried a lot to solve it on my own, like; modifying/removing the version part of the prestaqna.php file like you suggested, replaced the code directly to the product.tpl file but no matter what i try i just can't figure it out. I noticed that a few other people are experiencing the same problem. 

 

I would be great if you could help us to show your module in a separate tab on the product page....

 

ps. Is there any chance you will integrate back office notifications to the module in the future?

 

example url: new.pvcvloerstore.nl/home/536-mflor-ithring-oak.html

Share this post


Link to post
Share on other sites

@maxalerator
Yeah the points I described above (removing the version check) should be enough, so it's really strange it doesn't work for you.
And yes, I will integrate it with the next release (not sure when, I am recently trying to check all my modules for 1.7)

  • Like 1

Share this post


Link to post
Share on other sites
  • 4 months later...
  • 1 month later...

Just in case someone stumbles upon this awesome module and wants to make it work in tabs in PS 1.6

And like myself is not really versed in code

 

You may want your prestaqna.php look like the one on the left

 

First comment out or remove  if(version_compare(_PS_VERSION_, '1.6', '<')) on line 386

Then do the same to lines 409 and 410

And the word else for good measure

 

Don't think i've changed anything besides that. It looks like pic related, i took the liberty of translating the module but you get the point. Shows in that single tab only.

Currently on presta 1.6.1.1

post-1317935-0-87491800-1474668014_thumb.png

post-1317935-0-58804000-1474668040_thumb.png

  • Like 2

Share this post


Link to post
Share on other sites
  • 2 weeks later...

         This is a very good module. I have one small problem. I have installed this module I have 5 product with same name Cleaning brush.

 

1)Customer ask a question  

2) Module display question for cleaning brush

3) How to find which cleaning brush out of 5. Link to product product page is not provided or image or ref product

4)Randomly answersed

5) came to know after answering question in diplomatic way without knowing which Cleaning Brush customer is asking question for after answering link is provided in stats section

6)Need Help-  How to get link to product page before answering the question. So proper ans can be provided to customer by knowing exactly for which product question has been asked out of 5 cleaning brush

 

Or am I missing something please guide.

 

I just need know exactly for which product question is for

Edited by Zen_j1 (see edit history)

Share this post


Link to post
Share on other sites

Go to Module configuration page.

Just under Stats you will see all product with questions.

Click on product and you will be redirected to product page (admin)

 

When instaling module under Admin/Catalog/Product will be created new tab "Asq a question"

Share this post


Link to post
Share on other sites

Go to Module configuration page.

Just under Stats you will see all product with questions.

Click on product and you will be redirected to product page (admin)

 

Can you post a screenshot please ?

 

On my side I only see products names and no hyperlink or redirection to the product page.

Share this post


Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

Nemo excellent module, I cannot see it under stats in my case but I do receive the questions on my inbox. I just have to translate it to spanish and voilá!. An issue I am having is the alignment under the "usefull_link_block" where is appears all crooked (see screenshot). I have been trying to fix it but didn't achieved any results. I am looking to follow the sequence of the other items Facebook sharing, Send to a Friend and Print.

asking.gif

P.S. Another useful upgrade would be to have an email validation (2 emails fields) on the pop up window because it has happened before where a guest asks a question but misspells the email so there is no way to contact him.

cheers,
AJ

Share this post


Link to post
Share on other sites

Ah, sorry I forgot to mention it, I can't tell as it's cached (ccc is enabled). So you can just disable it, right click on that in chrome and see where the css comes from

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hi NemoPS can you please help me ? I install the module on ps 1.6.1.6 module working good but i dont recieve any email notification when someone post question. 

How can i fix that thanks for reply.

 

Share this post


Link to post
Share on other sites

Hi, 


    How to resolve this log error ,


 


ID   Employee  Severity  Message                   Object Type    Object ID   Error code    Date


1      A. Admin       1       Customer edition          Customer           8               0x 0          09/30/2016 07:54:06


Share this post


Link to post
Share on other sites
  • 3 weeks later...

Just in case someone stumbles upon this awesome module and wants to make it work in tabs in PS 1.6

And like myself is not really versed in code

 

You may want your prestaqna.php look like the one on the left

 

First comment out or remove  if(version_compare(_PS_VERSION_, '1.6', '<')) on line 386

Then do the same to lines 409 and 410

And the word else for good measure

 

Don't think i've changed anything besides that. It looks like pic related, i took the liberty of translating the module but you get the point. Shows in that single tab only.

Currently on presta 1.6.1.1

 

Great info thanks. I did the mod for making tabs in 1.6 like 1.5 but couldn't get this tab to show properly. This fixed it thanks.

 

I just have a small issue if anyone can advise. I want to make a space between the text area and the 'Name'. 

 

Q%26A.JPG

 

EDIT: Sorted it. If anyone is interested in module/prestasqna/views/templates/hook/prestaqna_tab_content15.tpl on line 10 add:

 

<br> after <textarea name="qna_q" id="qna_q" rows="8"/></textarea> on line 10

Edited by Dave L (see edit history)

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hi,

I want to override one core controller, but instead of changing in override folder, I want to provide my new version of the controller directly from the module. In this way, users will not have to copy other files.

I have observed that if I place my controller under:

modules/my_module/override/controllers/front
when the module is installed, all my code goes to the base override folder:

override/controllers/front
No problem until now. However, the big question is what happens if 2 different modules are overriding the same controller?
What is stored under override/controllers/front ?

I don't believe there is an aggregation, as it will be impossible. So how is this case treated?

Share this post


Link to post
Share on other sites

Hello Nemo, awesome module as I have stated before, works great on 1.6+. I recently received 18 emails from different products which was more like someone trying to hack [sample@email.tst] so is there a way to add image word validation {captcha} to the form?

Share this post


Link to post
Share on other sites

I want to override same file from one module to another module. Suppose i installed two module that time override file get some errors. how to resolve it. I need to access one module override class and controller file to another module override  class and controller.

Share this post


Link to post
Share on other sites

you cannot override the same file and method. You can override the same file, but only if the method you want to add is not overridden already

Share this post


Link to post
Share on other sites

In my case, Im created a one custom module.iinside folder i want to override a base Group.php and AdminGroupsController.php . I want to add a one field to group.php file and add that field value to admingroupscontroller.php file.. Everything is working.now i want to override a same Group.php and AdminGroupsController.php to another module. both module are installed that time error occured.how to overcome this errors

Share this post


Link to post
Share on other sites
  • 1 month later...

Good,
I am trying to color recaptcha in its module but it does not work for me when validating, this is clicked or it does not send me the question.
I read that you indicated to another user that it had to modify the file prestaqna.js, but I did not get it to work.

Could you tell me how to solve it?

Thank you very much

Share this post


Link to post
Share on other sites

Are you trying to use google's recaptcha? you should get away quite easily with that, just hide the button until the google callback runs, then perform the additional check with a curl in the php that sends the email over

Share this post


Link to post
Share on other sites

Good,

Yes, I'm using google's recaptcha
I've done a lot of testing, I've read some manuals but I can not get it to work. I have it working in contacts but in its module I can not.

My knowledge does not give much

Share this post


Link to post
Share on other sites
  • 4 months later...

Hello,

 

I am interested too by this modification but I don't succeed to modify the code.

 

Can you help me to modify the function ?

	public function getQNAS($id_product)
	{
		return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
			SELECT *
			FROM '._DB_PREFIX_.$this->table_name.' WHERE id_product = '.$id_product.' AND approved = 1');
		    
	}

Share this post


Link to post
Share on other sites

I would like to have the oldest questions at the top of the page and the newest at the bottom.

 

Can you give me the exact QNAS function code to achieve that ?

 

Thank you in advance :)

Share this post


Link to post
Share on other sites

Hello, I think I don't place the code at the right place, it changes nothing :

	public function getQNAS($id_product)
	{
		return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
			SELECT question, name, answer, date_added
			ORDER BY date_added DESC
			FROM '._DB_PREFIX_.$this->table_name.' WHERE id_product = '.$id_product.' AND approved = 1');
		    
	}

Can you give me the exact piece of code please ?

Share this post


Link to post
Share on other sites

In the getQNAS method in prestaqna.php, add ORDER BY date_added desc

hi nemo .. can you show us ? i can not do it . every time wrong :( but it is very important to me

Share this post


Link to post
Share on other sites

here 

 

public function getQNAS($id_product)
    {
        return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
            SELECT question, name, answer, date_added
            FROM '
._DB_PREFIX_.$this->table_name.' WHERE id_product = '.$id_product.' AND approved = 1             ORDER BY date_added DESC');

        
    
}

  • Like 1

Share this post


Link to post
Share on other sites

here 

 

public function getQNAS($id_product)

    {

        return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('

            SELECT question, name, answer, date_added

            FROM '._DB_PREFIX_.$this->table_name.' WHERE id_product = '.$id_product.' AND approved = 1             ORDER BY date_added DESC');

        

    }

thank you so much . it worked

Share this post


Link to post
Share on other sites

Hello Nemo,

 

Sadly this code doesn't change anything :(

 

I tried with DESC or ASC or without the new code, questions are always in the same order as before :(

 

Since it worked for the other user, do you have any caching system enabled?

Share this post


Link to post
Share on other sites

Hi NemoPS,

 

I am so sorry, I didn't understood correctly and I feel really stupid now :huh:

 

The code works perfectly from front office.

 

In fact I was interested for the module admin back office modification, oldest question at the top and newest at the bottom...

 

Can you help me to achieve that please ?

Share this post


Link to post
Share on other sites
  • 1 month later...

Hi NemoPS,

 

I was interested for the module admin back office modification, oldest question at the top and newest at the bottom...

 

Can you help me to achieve that please ?

 

Can you help me to achieve this Nemo please ?

Share this post


Link to post
Share on other sites

@KevinNash

THe function is listPending

 

	public function listPending($id_lang)
	{
		return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
			SELECT q.*, pl.name as pname
			FROM '._DB_PREFIX_.$this->table_name.' q
			LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = q.id_product)
			WHERE approved = 0
			AND pl.id_lang ='.$id_lang.' GROUP BY q.id_qna ORDER BY q.id_product');		
	}

Change the order by to date_added

  • Like 2

Share this post


Link to post
Share on other sites

@KevinNash

 

THe function is listPending

 

 

	public function listPending($id_lang)
	{
		return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
			SELECT q.*, pl.name as pname
			FROM '._DB_PREFIX_.$this->table_name.' q
			LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = q.id_product)
			WHERE approved = 0
			AND pl.id_lang ='.$id_lang.' GROUP BY q.id_qna ORDER BY q.id_product');		
	}

Change the order by to date_added

 

Thank you very much, it works like a charm :)

Share this post


Link to post
Share on other sites

Hi NemoPS,

I 'm using Prestashop 1.4.9 and when I  installed this module, this message appear:Le(s) module(s) suivant(s) n'ont pas été correctement installés:prestaqna
I set 'display_errors', 'on' but no message error appear.
I attempt to debug with Chrome or Firefox tools developper but not error detected.
Could'you help me to solved my problem? Thank's in advance.

Share this post


Link to post
Share on other sites

Hello Nemo I investigate and this hook not exist on 1.4.9:

displayAdminProductsExtra
actionProductUpdate
displayBackOfficeHeader
I create them.
Now your's module was installed successuf but no new tab was add on product page, this message appear "No template found for module prestaqna".
Do you know what are the names of this hook to PS 1.4.9?
This error message appear too on chrome debug tool: prestaqna.js:21 Uncaught ReferenceError: qna_bademail is not defined
 
Could'you help me?
 
Thank's a lot. 
Edited by Cyrius91 (see edit history)

Share this post


Link to post
Share on other sites

I move all tpl files in root module, now tab "ask a question" is ok.

New problem,when I "send question" this error appear: Fatal error: Call to undefined method Product::getProductName() in \prestaqna.php

 

This module version 1.2.1 is it compliant whith PS1.4?

Share this post


Link to post
Share on other sites