Hello. I made an override for "addtocartbtn.php" file:
<?php
/**
*
* loads the add to cart button
*
* @package VirtueMart
* @subpackage
* @author Max Milbers, Valerie Isaksen
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2015 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @version $Id: addtocartbtn.php 8024 2014-06-12 15:08:59Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');
if($viewData['orderable']) {
echo "<a type='submit' class='addtocart-button' href='https://aleksius.com/' target='_blank' rel='nofollow noopener'><span class='mybuy-button'>Buy</span></a>";
/* echo '<input class="addtocart-button" value="'.vmText::_( 'COM_VIRTUEMART_CART_ADD_TO' ).'" title="'.vmText::_( 'COM_VIRTUEMART_CART_ADD_TO' ).'" />'; */
} else {
echo '<span name="addtocart" class="addtocart-button-disabled" title="'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT' ).'" >'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT' ).'</span>';
}
Now, by clicking on the buy button, the site page opens:
echo "<a type='submit' class='addtocart-button' href='https://aleksius.com/' target='_blank' rel='nofollow noopener'><span class='mybuy-button'>Buy</span></a>";
Everything works fine. But I need multilingual support. How to change this code so that instead of the word "Buy" I can use a language constant "COM_VIRTUEMART_CART_ADD_TO"? Thanks in advance for your reply.
echo "<a type='submit' class='addtocart-button' href='https://aleksius.com/' target='_blank' rel='nofollow noopener'><span class='mybuy-button'>".vmText::_( 'COM_VIRTUEMART_CART_ADD_TO' )."</span></a>";
Thank you very much. That helped. The question is closed.