- Posts: 148
- Thank you received: 21
deactivate automatic sending when click on stars with comment filled
3 years 5 months ago - 3 years 5 months ago #351034
by FDBI
Hi,
It's all in the title:
I use the 'Vote & Comment connected' option.
Is it possible to block the automatic sending of the comment when voting?
I would like the user to have to use the button to send it (to avoid a user sending by mistake a comment that he would not have finished because he would have clicked on the stars in the meantime, especially as the user cannot edit it).
Thanks in advance for your help.
It's all in the title:
I use the 'Vote & Comment connected' option.
Is it possible to block the automatic sending of the comment when voting?
I would like the user to have to use the button to send it (to avoid a user sending by mistake a comment that he would not have finished because he would have clicked on the stars in the meantime, especially as the user cannot edit it).
Thanks in advance for your help.
Last edit: 3 years 5 months ago by FDBI.
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #351037
by Philip
Replied by Philip on topic deactivate automatic sending when click on stars with comment filled
Hello,
Please, provide us your Vote & Comment part settings screenshot, please take care to allow us to see everything of this part.
You will find it, from HikaShop Configuration => Features tab, and so VOTE & COMMENT part.
Awaiting your returns to progress on your subject.
Regards
Please, provide us your Vote & Comment part settings screenshot, please take care to allow us to see everything of this part.
You will find it, from HikaShop Configuration => Features tab, and so VOTE & COMMENT part.
Awaiting your returns to progress on your subject.
Regards
Last edit: 3 years 5 months ago by Philip.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351062
by FDBI
Replied by FDBI on topic deactivate automatic sending when click on stars with comment filled
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #351067
by Philip
Replied by Philip on topic deactivate automatic sending when click on stars with comment filled
Hello,
Can you try to define your first option "Choose which module you want to enable" on Vote & Comment but not "Connected" ?
If I'm right this will achieved your request.
Regards
Can you try to define your first option "Choose which module you want to enable" on Vote & Comment but not "Connected" ?
If I'm right this will achieved your request.
Regards
Last edit: 3 years 5 months ago by Philip.
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #351082
by FDBI
Replied by FDBI on topic deactivate automatic sending when click on stars with comment filled
If I choose this option, the problem is that I can vote without commenting (and comment without voting).
My need :
- A comment and a vote (both mandatory, and linked)
- That the vote and the comment are only sent when clicking on the button below (not when I vote).
In fact I would like to disable the sending of the form (the comment), when I click on the vote, but I don't know where to make the change.
Edit :
As I'm trying to figure out how to do this, I'm wondering if I should make a modification to the 'vote.js' file, but as I'm not very comfortable with this part of the code and I'm not sure how to override it, I'm afraid of breaking something.
My need :
- A comment and a vote (both mandatory, and linked)
- That the vote and the comment are only sent when clicking on the button below (not when I vote).
In fact I would like to disable the sending of the form (the comment), when I click on the vote, but I don't know where to make the change.
Edit :
As I'm trying to figure out how to do this, I'm wondering if I should make a modification to the 'vote.js' file, but as I'm not very comfortable with this part of the code and I'm not sure how to override it, I'm afraid of breaking something.
Last edit: 3 years 5 months ago by FDBI.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351094
by nicolas
Replied by nicolas on topic deactivate automatic sending when click on stars with comment filled
Hi,
You would indeed have to remove the line:
from media/com_hikashop/js/vote.js
Make sure you clear your browser's cache when testing the change.
Also note that you'll have to redo the change after each update.
A cleaner solution would be to do a view override of vote / form via the menu Display>Views and overwrite the hikaVote.click method with the code from vote.js but without that line.
That way, you'll keep the modification after each update.
Something like that:
You would indeed have to remove the line:
Code:
hikashop_send_vote(rating, from);
Make sure you clear your browser's cache when testing the change.
Also note that you'll have to redo the change after each update.
A cleaner solution would be to do a view override of vote / form via the menu Display>Views and overwrite the hikaVote.click method with the code from vote.js but without that line.
That way, you'll keep the modification after each update.
Something like that:
Code:
<script>
hikaVote.click = function(e) {
var t = this, d = document;
if (!e.target)
e.target = e.srcElement;
var rating = e.target.getAttribute('title').replace('', ''),
from = t.selectBox.getAttribute('id');
t.setRating(rating);
t.selectBox.value = rating;
// Send the id of the view which send the vote ( mini / form )
if(hikashop_send_vote){
var el = d.getElementById('hikashop_vote_rating_id');
if(el) el.value = rating;
}
if(t.cb)
t.cb(rating, from);
}
</script>
The following user(s) said Thank You: FDBI
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #351161
by FDBI
Replied by FDBI on topic deactivate automatic sending when click on stars with comment filled
Hi,
Removing the line in the .js file works fine but not the override:
I have an override for the file form/vote.php (which I had done to move elements). The file is in 'templates/{MY_TEMPLATE}/html/com_hikashop/vote/form.php'.
I added the code at the end of the file, but the problem remains.
hikaVote.click does not seem to be overrided, have I forgotten anything?
Removing the line in the .js file works fine but not the override:
I have an override for the file form/vote.php (which I had done to move elements). The file is in 'templates/{MY_TEMPLATE}/html/com_hikashop/vote/form.php'.
I added the code at the end of the file, but the problem remains.
hikaVote.click does not seem to be overrided, have I forgotten anything?
Last edit: 3 years 5 months ago by FDBI.
Please Log in or Create an account to join the conversation.
3 years 5 months ago #351164
by nicolas
Replied by nicolas on topic deactivate automatic sending when click on stars with comment filled
Hi,
I'm not sure. I haven't tested this modification. I've just wrote this on the top of my head to help you. I guess it would require some proper development and testing to make it work properly.
Please understand that this is customization work, not normal user support.
I'm not sure. I haven't tested this modification. I've just wrote this on the top of my head to help you. I guess it would require some proper development and testing to make it work properly.
Please understand that this is customization work, not normal user support.
The following user(s) said Thank You: FDBI
Please Log in or Create an account to join the conversation.
3 years 5 months ago - 3 years 5 months ago #351177
by FDBI
Replied by FDBI on topic deactivate automatic sending when click on stars with comment filled
Ok, no problem.
At least I have a solution that works.
Thanks for your help.
At least I have a solution that works.
Thanks for your help.
Last edit: 3 years 5 months ago by FDBI.
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds