Magento - 如何为支票/汇票订单添加折扣?
我四处询问并谷歌搜索,但仍然一无所获。
我希望能够向选择不通过电汇或支票直接付款的任何人提供 10%(或 wtv)折扣。
这可以用 Magento 来完成吗?
I've asked around and google'd but still nothing.
I want to be able to offer a 10% (or wtv) discount to anyone that opts out to pay directly through Wire Transfer or Check.
Can this be accomplished with Magento?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此问题有 2 种可能的解决方案:
使用 javascript 的客户端解决方案。您在 JavaScript 中计算折扣价格并将新价格发送到 PayPal。优点是易于实现,但折扣代码可能会被其他人看到,因为密码在javascript中。请参阅 http://icode4you.net/how- 使用 JavaScript创建a-coupon-discount-for-paypal-buttons
服务器端解决方案。您可以在服务端计算折扣价格,这样您就可以在服务器上验证折扣码,更加安全。服务器端代码使用 PHP 或其他受支持的编程语言(具体取决于您的网站)将更新后的价格发送到 PayPal。请参阅:Paypal Express Checkout 优惠券代码。
There are 2 possible solutions for this problem:
client side solution using javascript. You calculate the the discount price in javascript and send the new price to paypal. The advantage is easy to implement, but the discount code might be seen by others because the password is in the javascript. Refer to http://icode4you.net/how-to-create-a-coupon-discount-for-paypal-buttons
server side solution. Yo calculate the discount price on the service side which allows you to validate the discount code on the server which is more secure. And the server side code send the updated price to paypal using PHP or other supported programming language depending on your website. Refer to: Coupon Code For Paypal Express Checkout.