每小时变化的产品的动态价格
我正在运营一个银条网站。白银的价格每小时都在变化。白银价格存储在变量中。我正在寻找一个用于 WordPress 的购物车,它可以执行以下操作:
例如,我有一个产品名称 Silver Coin:
Silver 销售价格 目前为 $25.5 --->购物车应该从 PHP 变量中选择此值,但不要将其输出为产品的实际价格
产品价格 将是 25.5 美元的 1.2% -------- ------> 这应该是产品的实际价格,输出作为产品价格
如何获得此功能以及使用哪个购物车?我正在使用 WP-eCommerce 插件,任何人都可以帮忙。
I am running a silver bullion website. The price of silver changes every hour. The silver price is stored in a variable. I am searching for a shopping cart for wordpress that can do the following things:
For example I have a product name Silver Coin:
Silver Selling price at the present hour is $25.5
---> The cart Should pick this value from a PHP variable But dont output it as actual price of the product
The product price will be 1.2% of $25.5 ---------------->
This Should be the actual price of product and output as the product price
How to get this functionality and with which shopping cart? I am using WP-eCommerce Plugin, anyone can help please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不久前我做了类似的事情,而且相当简单。
如果例如您的某些价格是白银价格的 1.5%,而其他价格是 1.2%,那么您可以设置产品价格中的百分比。然后,不要替换模板文件中的函数调用,而是使用它来检索产品百分比,并与白银价格一起计算产品价格。
I did something similar not long ago and it was fairly straight forward.
If for example some of your prices are 1.5% of the silver price and others are 1.2% then you could set the percentage in the product price. Then instead of replacing the function call in the template file use it to retrieve the product percentage and along with your silver price calculate the product price.