I am fairly new to Joomla and Virtuemart. The versions that I use are: Joomla : 3.6.4 Virtuemart : 3.0.18

As the title suggests, I'd like to make certain products link to an external url when the shopper clicks the 'Add to cart' button. Which files or codes should I alter to achieve this. Can someone please guide me on this?

  • I don't know who downvoted your question (also official documentation recommends posting a comment explaining why you downvoted it), but it essentialy means: "This question does not show any research effort, it is unclear or not useful" (from the downvote-tooltip). In other words, show us some effort of your own, and then ask additional clarifications. You can't ask us to do your homework. Also, give us more information about the site and it's template, especially because your question can be solved by template overrides. – Mikan Nov 21 '16 at 12:23

You can achieve this by accessing product object of VirtueMart. I have done it with the custom field, so my products which have any particular custom field has 'add to cart' button replaced with my button and functionality. And as I am onto the custom field of the product, I can easily access its product object.

check my answer and discussion here:

Remove 'add to cart' button on all Virtuemart views except in productdetails

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.