2010-08-19 52 views
0

我可以将“自定义格式化程序”预设应用于Ubercart购物车吗?如何在Ubercart cart中添加灯箱图片?

我需要自定义购物车中图像的html代码。

我试图用hook_form_alter做到这一点,但我得到的是输出HTML,它是来不及修改:

[#VALUE => <一个 HREF =“/网站/ node/87“> < img src =”http:// localhost/website/path/to/picture 1.png“alt =”“title =”“class =”imagecache imagecache-cart“ width =” 100“height =”221“/>

我需要添加”rel = lightbox“属性并更改href路径。 谢谢

回答

0

我想你想看看hook_uc_image_widget。我无法找到它的API文档,但您可以在jQZoom module中看到example implementation

+0

你确定这个功能是用于购物车而不是目录?有相同的lightbox2触发器(在Ubercart设置中,您确实拥有lightbox2,但仅适用于目录)。 – aneuryzm 2010-08-20 09:53:12

+0

无论如何,这是文档:http://api.ubercart.org/api/function/uc_store_uc_image_widget/2/references?sort=desc&order=Name – aneuryzm 2010-08-20 09:53:32