Magento 购买事件触发器访问脚本文件并提供输入的变量

发布于 2024-11-03 18:17:55 字数 940 浏览 0 评论 0原文

我正在使用 Magento 建立一个在线商店。可购买的东西之一是 Mumble 服务器(ftp 帐户和其他网络事物将完成,但主要问题是 Mumble,因为它需要自动且即时。

以下是它的工作方式。首先,我们有一个个人制作的服务器目前我没有要发布的脚本文件,但我可以稍后添加该文件。

  1. 用户从商店购买 Mumble 服务器,并使用他们从下拉列表和输入字段中选择的变量。 [例如/ 30 个插槽;质量:90kbps;部落缩写:NFC;超级用户密码:password5;您的电子邮件:[email protected]]

  2. 购买触发器服务器脚本和向脚本提供从文本框中选择/输入的变量。

  3. 服务器脚本将 Mumble Server 文件复制到一个文件夹,并根据要求设置服务器并随机选择端口。

  4. 电子邮件已发送给客户,[电子邮件受保护],给予他们选择的选项、SU 密码以及 mumble 服务器的地址。 [ex/ 69.547.99.101:25565]

我还没有网上商店,因为我还没有购买域名,但我确实有一个测试。服务器已经存在。

脚本已经制作完成,对我来说最大的问题是如何让 Magento 与特定商品购买的脚本对话并提供所选的变量。

我将与我的合作伙伴讨论他的脚本,看看他是否还可以包含一个新脚本来记录随机选择的端口和凭据,并让服务器向客户发送电子邮件。

I'm setting up an online store using Magento. One of the things purchasable will Mumble servers (ftp accounts and other web things will be done, but the main issue is mumble as it needs to be automatic and immediate.

Here is how it's going to work. First off we have a personally made server script. At the moment I don't have the script file for me to post but I can add that later.

  1. User purchases Mumble server from store with variables they select from drop down lists and input fields.
    [ex/ 30 slots; quality: 90kbps; clan acronym: NFC; superuser password: password5; your email: [email protected]]

  2. Purchase triggers server script and provides the script with the variables selected / inputed from the text boxes.

  3. Server script copies the Mumble Server files to a folder and sets up the server as asked and randomly selects a port.

  4. Email is sent to the customer, [email protected], giving them their selected options, their SU password, and the address to their mumble server. [ex/ 69.547.99.101:25565]

I don't have the web store up yet as I haven't bought the domain yet, but I do have a test one up. The server exists already.

The script is already made, the biggest issue to me is how to have Magento talk to the script on a specific item purchase AND provide the variables selected.

I'll talk to my partner with this about his script and see if he can also include a new script that records the randomly selected port and credentials and has the server sends an email to the customer.

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

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

发布评论

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

评论(1

喜爱皱眉﹌ 2024-11-10 18:17:55

在订单的某些事件上使用 Magento 事件观察器(实际上,完成付款在这里是一个很好的选择)。当该事件触发时,让观察者通过任何标准方式(fork、通过 URL 等)调用您的服务器脚本。

大多数人在这里遇到的问题是,某些付款方式可能会让人很难判断订单何时已正确“完成”并应触发您的自定义代码。在上线并感到惊讶之前,请务必测试所有付款方式等的订单流程。

Use a Magento event observer on some event for the order (actually, completing payment would be a good one here). When that event fires, have the observer invoke your server script through whatever standard means (fork, by URL, etc etc).

The place where most people get tripped up here is that some payment methods may make it difficult to tell when an order has been properly 'completed' and should trigger your custom code. Make sure to test the order flow for all payment methods etc before going live and getting surprised.

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