VirtueMart 2.5 Index.php模板

VirtueMart 2.5 Index.php模板,php,templates,joomla2.5,virtuemart,Php,Templates,Joomla2.5,Virtuemart,我正在寻找一种方法来删除mod_virtuemart_购物车中的产品链接。我想要的产品名称-只是没有链接。我被困在default.php页面mod_virtuemart_cart/tmpl/下的第34行: <div class="product_row"> <span class="quantity"><?php echo $product['quantity'] ?></span>&nbsp;x&nbs

我正在寻找一种方法来删除mod_virtuemart_购物车中的产品链接。我想要的产品名称-只是没有链接。我被困在default.php页面mod_virtuemart_cart/tmpl/下的第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>

x
有什么想法吗?下面是一个图片的URL,以帮助更好地显示我正在努力实现的目标

谢谢


Michael

在JRoot/components/com\u 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删除链接。

FYI在模板目录的覆盖模块模板文件的第20行添加以下代码: /模板/(名称)/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\u virtuemart\u cart/tmpl文件夹中提取default.php文件,并将其复制到模板/html文件夹中并进行编辑。

除非您在vm Forum中注册,否则所附图像不可见。毫无疑问,链接已更正。谢谢,是的,谢谢!我不知道为什么没有一种方法可以通过模板编辑这个mod-但是,我对Joomla和PHP.FYI有一个相当软的了解-要更改的行现在是VirtueMart 2.6.8中的1692。