godaddy / wp-reseller-store

Resell hosting, domains, and more right from your WordPress site.
https://www.godaddy.com/reseller-program
GNU General Public License v2.0
62 stars 33 forks source link

Define Currency in Shortcodes #123

Open ekamran opened 2 years ago

ekamran commented 2 years ago

Is it possible to add CURRENCY feature in the Shortcode itself?

I live in India but major market is USA.

Instead of making 2 different sites with default currency,

I can simply add currency=inr & the price will be listed in Indian Currency.

This will save me from creating 2 different WordPress sites, what say?

cberesford-godaddy commented 1 year ago

Hi @ekamran - All of our APIs support the currency field. Can you provide a specific example of which shortcode you are trying to use?

ekamran commented 1 year ago

Wow, finally a response after 15 months of waiting.

This is a sample product shortcode: [rstore_product post_id=10 show_title=1 show_content=1 show_price=1 redirect=1 button_label="Add to cart" text_cart="Continue to cart" image_size="original" ]

It will show a product in the currency I selected in the plugin settings.

But since, I have multiple markets to cater to, I want to them to work something like the following.

For Indian Market [rstore_product post_id=10 show_title=1 show_content=1 show_price=1 redirect=1 button_label="Add to cart" text_cart="Continue to cart" image_size="original" currency="inr" ]

For US Market [rstore_product post_id=10 show_title=1 show_content=1 show_price=1 redirect=1 button_label="Add to cart" text_cart="Continue to cart" image_size="original" currency="usd" ]

Notice the additional currency="inr/usd" at the end.

cberesford-godaddy commented 1 year ago

Ah, I see. In essence, this above issue is a new feature request, since the product catalog is currently imported into your local WordPress installation by calling the API's catalog endpoint with your reseller's default market/currency selections that are set in the Reseller Control Center (i.e. the API call that is made is along the lines of https://www.secureserver.net/api/v1/catalog/1592/products?currencyType=USD&marketId=en-US). The WordPress plugin does not currently support duplicate products in a different market/currency. So, in order to have a true multi-currency WordPress site, you will need to do something similar to what you are doing above by having separate WordPress sites.

I am flagging this as a feature request and notifying our teams to see when we can get this type of addition prioritized.