News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart - Change “add to cart” to link elsewhere

Started by Al3llam, June 08, 2014, 07:51:14 AM

Previous topic - Next topic

Al3llam

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!

GJC Web Design

Just delete this and make your own button link - over ride of course the default_addtocart.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Al3llam

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

Al3llam