Magento 顶级购物车 Ajax 问题
我在列表页面上实现了一个基于 Ajax 的按钮,该按钮将通过 Ajax 添加产品。但是,我对顶部显示的购物车遇到了问题。我也想更新购物车。
购物车 phtml 文件位于 checkout/cart/topbar.phtml
我是编码新手,因为我们需要为文件提供prototype.js http路径来处理,但我找不到topbar.phtml
的任何http路径,所以我可以用内容更新div。 如果有任何不清楚的地方,请告诉我。
我试图非常具体地说明我的问题。
我想更新包含顶部购物车的 div,购物车 phtml 已经存在,它是从 $this->getChildHtml('topcart')
调用的,服务器中的文件路径是 checkout/cart /topbar.phtml
I have implemented an Ajax based button on the listing page that will add the product through Ajax. However i am having problems with the cart shown on the top. I want to update the cart as well.
The cart phtml file is located in checkout/cart/topbar.phtml
I am new to coding, since we need to give prototype.js http path to the file to process i can not find any http path to topbar.phtml
so i can update the div with the content.
If anything is unclear please let me know.
I tried to be very specific about my problem.
I want to update the div containing top cart, the cart phtml is already there its being called from $this->getChildHtml('topcart')
the file path in server is checkout/cart/topbar.phtml
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否考虑过使用这些现成的扩展之一?
Have you considered using one of these ready made extensions?
在管理部分中,转到
页面左上角,将当前配置范围更改为“主网站”,然后更改“模板路径提示”和“添加块名称”到提示”到是
现在,当您打开magento商店时,您将看到每个magento对象的块名称,因此查找您需要的对象,最后执行以下操作:
In the admin section go to
after that go to the top left of the page and change the Current Configuration Scope to "Main website" and then change "Template Path Hints" and "Add Block Names to Hints" to Yes
Now, when you open the magento store you'll see the block names of every magento object, so look for the one you need and finally do: