[英]VirtueMart 2.5 Index.php Template
I'm looking for a way to remove the product(s) link in the mod_virtuemart_cart. 我正在寻找一种删除mod_virtuemart_cart中产品链接的方法。 I want the product name - just no link.
我想要产品名称-只是没有链接。 I'm stuck on line 34 of the default.php page under mod_virtuemart_cart/tmpl/:
我被卡在mod.virtuemart_cart / tmpl /下的default.php页面的第34行:
<div class="product_row">
<span class="quantity"><?php echo $product['quantity'] ?></span> x <span class="product_name"><?php echo $product['product_name'] <-- RIGHT HERE ?></span>
</div>
Any ideas? 有任何想法吗? Below is an URL to an image to help better show what I'm trying to accomplish.
下面是图像的URL,以帮助更好地显示我要完成的工作。
http://superiordash.com/images/templatehelp.png http://superiordash.com/images/templatehelp.png
Thanks, 谢谢,
Michael 麦可
in file JRoot/components/com_virtuemart/helpers/cart.php 在文件JRoot / components / com_virtuemart / helpers / cart.php中
on line 1663: change this: 1663行:更改此:
$this->data->products[$i]['product_name'] = JHTML::link($url, $product->product_name);
to this: 对此:
$this->data->products[$i]['product_name'] = $product->product_name;
or other method is to use jQuery to remove the link. 或其他方法是使用jQuery删除链接。
FYI adding the following code at about line 20 to an override module template file in your template directory: /templates/(name)/html/mod_virtuemart_cart/default.php 仅供参考,将以下代码在第20行添加到模板目录中的覆盖模块模板文件中:/templates/(name)/html/mod_virtuemart_cart/default.php
will result in a better manner to avoid breaking in the future: 将以更好的方式避免将来发生中断:
// Remove links from products
foreach ( $data->products as &$product ) {
$product['product_name'] = strip_tags( $product['product_name'] );
}
Pull the default.php file from your /modules/mod_virtuemart_cart/tmpl folder and copy it to your template/html folder and edit. 从/ modules / mod_virtuemart_cart / tmpl文件夹中提取default.php文件,并将其复制到template / html文件夹中并进行编辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.