0

我是 joomla 的新手,我快疯了,因为我想只使用产品的 ID 在模板上获取产品的价格(和另一个元数据),有没有人能告诉我如何获得它,也许用助手或静态方法实例化一个类?(我已经用谷歌搜索过了)。它是 Virtuemart 1.1.3 和 joomla 1.5.10。

提前致谢。

4

1 回答 1

0

仍然不清楚你想在哪里使用它,但如果你想从 VM 中获取产品信息,你可以查看很多地方,看看它是否适合你想要完成的任务:

Virtuemart 自定义 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(look for $products[$i]['product_price'] = $product_price;) 末尾附近的数组中,然后使用 加载到 VM 模板中$tpl->set( 'products', $products ),最后在渲染产品页面时使用

于 2012-06-27T19:54:48.063 回答