美德市场 - 将“添加到购物车”更改为链接到其他地方


Virtuemart - Change "add to cart" to link elsewhere

我希望我的美德超市2商店在人们点击"添加到购物车"按钮时引导人们找到联系表格或外部链接。我希望能够更改此按钮后面的链接。这怎么可能?

到目前为止,我只找到了在产品页面模板(组件/com_virtuemart/视图/产品详细信息/tmpl/default.php)中调用模板的位置:

<?php
    // Add To Cart Button
        // if (!empty($this->product->prices) and !empty($this->product->images[0]) and $this->product->images[0]->file_is_downloadable==0 ) {
    // if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices['salesPrice'])) {
        echo $this->loadTemplate('addtocart');
// }  // Add To Cart Button END
    ?>

任何帮助都非常感谢!

谢谢!

(components/com_virtuemart/views/productdetails/tmpl/default_addtocart.php) 是 PHP 寻找的。

在第 123 行及其周围出现以下行:

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

将 PHP 回显更改为:

<a href="yourwebsite.com/thelinkyouwanthere.php">Buy Product</a>

或类似的东西。

<span class="addtocart-button">
    <a href="yourwebsite.com/thelinkyouwanthere.php">Buy Product</a>
</span>

希望这有帮助。