簡體   English   中英

VirtueMart 2.5 Index.php模板

[英]VirtueMart 2.5 Index.php Template

我正在尋找一種刪除mod_virtuemart_cart中產品鏈接的方法。 我想要產品名稱-只是沒有鏈接。 我被卡在mod.virtuemart_cart / tmpl /下的default.php頁面的第34行:

 <div class="product_row">
            <span class="quantity"><?php echo  $product['quantity'] ?></span>&nbsp;x&nbsp;<span class="product_name"><?php echo $product['product_name'] <-- RIGHT HERE ?></span>
        </div>

有任何想法嗎? 下面是圖像的URL,以幫助更好地顯示我要完成的工作。

http://superiordash.com/images/templatehelp.png

謝謝,

麥可

在文件JRoot / components / com_virtuemart / helpers / cart.php中

1663行:更改此:

$this->data->products[$i]['product_name'] = JHTML::link($url, $product->product_name);

對此:

$this->data->products[$i]['product_name'] = $product->product_name;

或其他方法是使用jQuery刪除鏈接。

僅供參考,將以下代碼在第20行添加到模板目錄中的覆蓋模塊模板文件中:/templates/(name)/html/mod_virtuemart_cart/default.php

將以更好的方式避免將來發生中斷:

// Remove links from products
foreach ( $data->products as &$product ) {
    $product['product_name']    =   strip_tags( $product['product_name'] );
}

從/ modules / mod_virtuemart_cart / tmpl文件夾中提取default.php文件,並將其復制到template / html文件夾中並進行編輯。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM