| Disabling/removing "Ask a question about this product" in VirtueMart |
| Tuesday, 29 September 2009 02:04 |
|
One of the largest problems with VirtueMart is the huge amounts of spam that comes through the "Ask a question about this product" form linked on the product flypage (product details). There are no spam controls or filters of any form, so you get the lot.  This is because spammers use "robots" to travel around the Internet at thousands of pages per hour, looking for forms to fill in with what every they are selling. The robots are quite clever and know how to fill in the forms automatically and press submit. Once this is done it will save this URL and visit again a little later and do it again and again and again.  You can either - Hack files and add a captcha system - Delete the link to the "Ask a question about this product" form - Disable it properly so it wont work again without touching the core files.  To add a captcha system i a monster of a job, it also involves a large number of core hacks, which will all be over written when you update the core files.  Deleting the link to the form will not work, as the spam robot has already saved the path to the form, so it just goes directly to the form and bi-passes any links to it.  Soooooo The best way is to disable it completely in a way that wont be effected when you update the site.  To do this open the file components/com_virtuemart/themes/default/templates/pages/shop.ask.tpl.php (assuming "default" is the name of your theme, i usually rename them, so if any updates come down it wont over write my templates.)  When you open this in your favourite editor, such as Dreamweaver, "select all" and delete it all.  Now we need to remove the link to the form in the first place, which is very easy  Open components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php or what ever flypage you are using, (the flypage is what VirtueMart calls the product detail page)  Now find on about line 43  Thats it, you will never get another spam again.  If you want to, you could actually just replace the with a link to the your normal contact form, with something like this  Ask a question about this product (Ive added a space between index and .php in that code above, as my SEF component was making it into a link and showing it as a SEF link lol, So you need to remove that space of course)  Which will link to your contact form, just make sure your id number is correct, so it goes to the right contact form.  Regards Ian  Trackback(0)
Comments (9)
![]() written by Vinnie , July 22, 2011 Thanks man this is what I was looking for, it solved my problem as I needed to remove the ask seller question links. You Rock and Roll!! written by verawat , June 07, 2011 Good job about your post It can fix this problem for me. But if some people have problem same like this you must beware about 2 thing before edit. ------------------------------------------------------------------------------ components/com_virtuemart/themes/default/templates/pages/shop.ask.tpl.php BEWARE "default" is the name of your theme please make sure what is your JOOMLA theme name !!! ------------------------------------------------------------------------------ components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php BEWARE "default" is the name of your theme please make sure what is your VITUEMART theme name !!! ------------------------------------------------------------------------------ I used Joomla_1.5.23_eCommerce_Edition_VM_1.1.8 written by mahmudul , April 28, 2011 it's great solution, effective thanks author could i please have ur email id for further problem in joomla Write comment
|