VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Al3llam on June 08, 2014, 07:51:14 AM

Title: Virtuemart - Change “add to cart” to link elsewhere
Post by: Al3llam on June 08, 2014, 07:51:14 AM
I want my virtuemart 2 shop to lead people to a contact form, or external link when they click on "Add to cart" button. I want to be able to change the link behind this button. How is this possible?

So far, I have only found where the template is being called in the product page template (components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php) is the PHP looking for


<span class="addtocart-button">
    <?php echo shopFunctionsF::getAddToCartButton ($this->product->orderable);
      
// Display the add to cart button END  ?>

</span>


How do I make this code gets on the link (url) located inside the product settings

Any help is much appreciated!

Thanks!
Title: Re: Virtuemart - Change “add to cart” to link elsewhere
Post by: GJC Web Design on June 08, 2014, 13:40:15 PM
Just delete this and make your own button link - over ride of course the default_addtocart.php
Title: Re: Virtuemart - Change “add to cart” to link elsewhere
Post by: Al3llam on June 08, 2014, 14:32:19 PM
Quote from: GJC Web Design on June 08, 2014, 13:40:15 PM
Just delete this and make your own button link - over ride of course the default_addtocart.php

Is it possible to help me larger
You delete the code but the link (add to cart) disappeared in final
How can I put code instead leads required
Title: Re: Virtuemart - Change “add to cart” to link elsewhere
Post by: Al3llam on June 10, 2014, 16:47:44 PM
Is it helps one's desired modification