在模板上获得virtmart价格

时间:2012-06-27 17:30:30

标签: joomla helper virtuemart

我是joomla的新手,我变得疯狂,因为我想在模板上只使用产品的ID获得产品的价格(以及其他元数据),anyboy是否可以告诉我如何获取它,也许有一个帮助 o 静态方法实现一个类? (我用Google搜索了)。这是Virtuemart 1.1.3和joomla 1.5.10。

提前致谢。

1 个答案:

答案 0 :(得分:0)

仍然不清楚你想在哪里使用它,但如果它来自VM内你想获得产品信息,你可以看到很多地方,看看它是否适合你的用途试图完成:

Virtuemart Custom Theme.php

components\com_virtuemart\themes\default\theme.php找到。允许您编写自定义函数以访问VM中的任何内容供您自己使用。

/**
* This is the theme's function file.
* It allows you to declare additional functions and classes
* that may be used in your templates
*

在Flypage上浏览结果

搜索/浏览会保存许多产品字段 - 它们会保存到html\show.browse.php末尾附近的数组中(查找$products[$i]['product_price'] = $product_price;),然后使用$tpl->set( 'products', $products )加载到VM模板中,最后,在渲染产品飞行页面时使用