将PHP逻辑与Shopify的结帐页面绑定
在shopify
中,我在php
中制作了一个自定义应用程序。现在,我需要制作将在结帐
页面上使用的逻辑。
实际上,我需要有条件地更改UPS交付价格,这意味着我需要捕获或模拟将交付价格分配给产品价格的事件。
可以告诉我如何在index.php
上,在Checkout
页面上执行php
代码?还是如何以及在哪里可以将我的php
代码链接到页面结帐
?
在Shopify文档中,绝对没有有关此信息的信息!在shopify dev
文档中,我已经看到了wasm
的脚本 - https://shopify.dev/apps/checkout/shipping-methods ,但这不是我所需要的。
我非常希望您的帮助!谢谢!
In Shopify
I made a custom app in php
. And now I need to make logic that will work on the checkout
page.
In fact, I need to change the UPS delivery price conditionally, which means I need to catch or simulate the event of assigning the delivery price to the product price.
Can please tell me how I can execute my php
code, written in index.php
, on the checkout
page? Or how and where can I link my php
code to page checkout
?
There is absolutely no information on this in the shopify documentation! In the Shopify Dev
documentation, I've seen scripts for wasm
- https://shopify.dev/apps/checkout/shipping-methods, but that's not what I need.
I hope very much for your help! Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

您需要订阅您的商店以Shopify Plus。然后,您使用脚本编辑器来更改您的运输选项和价格。您不需要PHP。没有其他方法可以真正做到这一点。如果您尝试的话,您将进行一百个小时的长时间,艰苦,艰难的战斗,以制作半熟的东西。您的选择。加上30分钟的时间才能完成。
You need to subscribe your Store to Shopify Plus. Then, you use the Script Editor to change your Shipping Options and prices. You need no PHP. There is no other way to do it really. If you try, you will have a long, heavy, hard, uphill battle for a hundred hours to make something half-baked. Your choice. Plus is 30 minutes to get it done.