2013-10-08 50 views
-1

我希望我的virtmart 2商店在點擊「添加到購物車」按鈕時將人們引導至聯繫表單或外部鏈接。我希望能夠更改此按鈕背後的鏈接。這怎麼可能?Virtuemart - 將「添加到購物車」鏈接到其他地方

到目前爲止,我只找到其中​​的模板被稱爲在產品頁面模板(分量/ 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 

    ?> 

任何幫助是非常讚賞!

謝謝!

+0

沒有人有這樣的想法嗎?它應該是非常基本的,雖然我似乎無法找到實際的鏈接。 – Megadeth

回答

0

(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> 

希望這會有所幫助。

相關問題