Mob: 07760

ee-web thinks... a bit

Go on, make my day ... leave a comment

Spam on virtuemart

January 27th, 2012 by Edward

Some of my clients have been getting spam through the “Ask vendor a question” link in virutemart/joomla. You can reduce this by two steps:

First edit out the link “Ask seller a question about this product”

Go to site/components/com_virtuemart/themes/yourtheme/templates/product_details/flypage.tpl.php Assuming this is the flypage you are using (which it maynot be… you’ll know, because this wont work!). Once there comment out line(ish) 48 which says

   <td colspan="2"><?php echo $ask_seller ?></td>

like this

 <td colspan="2"><?php //echo $ask_seller ?></td>

So that will remove the link – however, those nastly littke spammy bots will probably have the address of your form … so you need also to take action with that page. I have tried putting a simple php redirect right at the top – this means that if the bots arrive they’ll be re-directed – in this case back to the index page.

This time go to site/components/com_virtuemart/themes/yourtheme/templates/pages/shop_ask.tpl.php and add something liek this right at the top (make sure NOTHING has gone out to the screen before eg no echo statemetns…) SO in other words you have something like this right at the top.

header('Location: <a href="'/">http://www.domain'</a>);

Edward owns and runs ee-web design and has been building websites for over 12 years. He is passionate about... most things really

Was this post helpful or interesting? Spread the news.

Leave a comment