从magento一页结帐到MVC控制器的JQuery.Post()调用 [英] JQuery.Post() call to mvc controller from magento onepage checkout

查看:89
本文介绍了从magento一页结帐到MVC控制器的JQuery.Post()调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Magento,Jquery和编程一起在学习曲线上乱七八糟,并寻找一些我遇到的问题的指导.

Im doing a little messing around and on a learning curve with Magento, Jquery and programming and looking for some guidance with an issue Ive been stuck on.

我想通过一页结帐过程中的步骤之一将一些信息发布到我的自定义模块的控制器中.

I want to post some information to a controller of my custom module from one of the steps during onepage checkout.

以下链接上的文章帮助我理解了如何实现这一目标,并遵循了该指南,以至于我现在仍然停留在该位置,但是我的发帖电话将发回到我的magento主页上,而不是我指定的页面上控制器动作.

The article at the following link has helped me understand how I could possibly achieve this and have followed that guide to the point that I am stuck at right now but my post call is posting back to my magento homepage as opposed to my specified controller action.

http://www.atwix.com/magento/ajax-requests -in-magento/

我怀疑我需要做些不同的操作,因为我正尝试从一页结帐中发回邮件.任何人都可以针对我如何使jquery.post()调用从一页结帐到自定义模块中的magento控制器操作方面指明正确的方向吗?

I suspect I need to do this a little differently as I am trying to post back from onepage checkout. Can anyone point me in the right direction as to how I can make the jquery.post() call from onepage checkout to my magento controller action that is in my custom module ?

推荐答案

Magento默认未安装jQuery. 原型是.您想在Javascript中执行:

jQuery isn't installed by default in Magento. Prototype is. You want to do this in your Javascript:

new Ajax.Request('<?php echo $this->getUrl('module/controller/action'); ?>');

module是模块的名称,依此类推.

Where module is the name of your Module and so on.

这篇关于从magento一页结帐到MVC控制器的JQuery.Post()调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆