所有网站页面上的购物车摘要

发布于 2024-09-13 08:27:14 字数 296 浏览 1 评论 0原文

我想在我的网站中添加一个带有购物车摘要的块。

所以我基本上需要检索购物车信息并显示它的简短摘要。看图片: http://dl.dropbox.com/u/72686/cartSummary.png

我怎样才能实现这个?

当然,我仍然有一个完整的静态页面,其中包含购物车项目和完整的详细信息。但我也想要这个小街区,里面有一个小版的购物车。

谢谢

I want to add a block with a shopping cart summary in my website.

T So I basically need to retrieve the shopping cart informations and display a brief summary of it. See picture:
http://dl.dropbox.com/u/72686/cartSummary.png

How can I implement this ?

Of course, I still have a complete static page with the shopping cart items and full details. But I also want this small block with a small version of the shopping cart.

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无力看清 2024-09-20 08:27:14

Ubercart 对于此类东西有自己的 api,使用 hook_block,然后使用 uc_cart_get_contents 获取购物车的内容。这将返回一个包含购物车中所有信息的数组,您可以使用 var_dump 或 var_export 将其打印出来,以从数组中查看您想要的内容。

Ubercart has its own api for this kind of stuff, create a module with a block using hook_block, then use uc_cart_get_contents to get the cart's contents. This returns an array with all the information in your shopping cart, you can print it out with var_dump or var_export to see what you want from the array.

提笔书几行 2024-09-20 08:27:14

对于 Drupal 的 Ubercart 模块

,您可以使用购物车块并启用“通过单击名称或箭头使购物车块可折叠”。特征。

为此:
转到 /admin/build/block/ 找到“购物车”块并将其移动到您想要的位置。然后单击配置链接并向下滚动,直到看到带有“通过单击名称或箭头使购物车块可折叠”的复选框。选中该框即可开始。这将显示您购物车中所有产品的列表。

希望这有帮助。

For Drupal's Ubercart Module

You can use the Cart Block and enable the "Make the shopping cart block collapsible by clicking the name or arrow." feature.

To do this:
Go to /admin/build/block/ find the "Shopping Cart" block and move it where you want it. Then click the configure link and scroll down until you see a check box with the "Make the shopping cart block collapsible by clicking the name or arrow." Check the box and you're good to go. This will display a list of all the products you have in your cart.

Hope this helps.

给不了的爱 2024-09-20 08:27:14

有一个丑陋但有效的解决方案(可以通过简单的 CSS 编码轻松自定义):

http://www .phpwebcommerce.com/

如果您愿意,我可以搜索更多更奇特的解决方案吗?

There is a ugly, but a working solution (it can be easily customized with a simple CSS coding):

http://www.phpwebcommerce.com/

If you want, I can search for more fancier solutions?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文