0

I am using Wordpress 3.4 and the WP E Commerce 3.8

Looked for the following functionality, but couldn't find quite the right answer. Hence I am trying my luck here. The plugin gives you the ability to provide a different price for a different currency. But at checkout, it is the base currency that is shown there. What I am looking for is :

  • The shop will have a drop down to select options. (Like fabindia web site)

a) Delivery within India
b) International Delivery

  • According to the selection the price is shown in INR (Delivery withing India) or in USD (International Delivery) IMPORTANT : The USD price is put manually, not converted from INR.
  • If the International Delivery is selected, the prices in the checkout page will be the USD price converted into INR.

Example : (user selected International Delivery)
Product page and single product page : Sandal Soap : USD 25
Checkout page - list of products : Sandal Soap : USD 25
- Amount payable : INR 1,340.93 ($25 converted into INR at current rate)

4

1 回答 1

0

抱歉,我在货币转换插件的评论中给你的答案显然对你没有帮助......我认为你应该看看 wp-e-commerce-role-discount 插件。它将附加价格字段添加到产品页面并读取“wpsc_top_of_products_page”挂钩中的字段值。也许源代码 可以帮助你:第 7 行和第 136 行(不要忘记 156)。您可以检查“useInternationalPrice()”或某事,而不是检查 isPremiumCustomer()。像那样。

但这只是您问题的第一部分。第二部分是将美元价格转换回印度卢比。这可以通过wp_remote_get()google 转换 API 的 a 或 curl 来完成:...google.com/ig/calculator?hl=en&q=100USD=?INR

于 2012-10-25T08:35:02.637 回答