Create Account
/ Reminder
 
 
 

New World Designs
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.

This will remove the actual form, so it is impossible for the spam spider to fill it in. Give it a go, try and click on the "Ask a question about this product", you should see a blank space where the form used to live.

 

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

$ask_seller

When you find it, you will see it is a full php tag, you need to remove it all. When i try to add it here my editor strips it out, so i cant add the whole thing.

Now delete it, save the page and upload it back to your site and you should find there is no more link.

 

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)add comment
0
...
written by valy , November 21, 2011

Thanks. work fine!


0
...
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!!


0
...
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



0
...
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



0
...
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



0
...
written by Bill , April 12, 2011

Great, you save me a lot of time.

Thanx, Ian.



Ian Wright
...
written by Ian , March 30, 2011

The tag you guys are trying to type is stripped out by the server security, as it thinks you are trying to inject code into the data base and prevents it. I have updated the article above to show this more clearly.


0
...
written by Piero , March 30, 2011

actually you need to find the line that says: ""




0
...
written by G , January 25, 2011

Where it says

"Now Find

And delete it," ... you simply need to find:
and delete it




Write comment
smaller | bigger
 

busy
 

© 1998 - 2009 New World Designs
Website hosted by New World Hosting Home | Photography | Web Design | Legal Documents | Blog