News:

Looking for documentation? Take a look on our wiki

Main Menu

Virtuemart 3.0, Distinct prices for different languages

Started by Hiago D'O.S, April 12, 2016, 16:04:28 PM

Previous topic - Next topic

Hiago D'O.S

I'm with an problem, that I want to put in VirtueMart 3 with two type of coins(cash) each one goes to one distinct language, for example:

I tried with two providers each one with different coin, but when I put for the second provider (provider2), he just change the coin equal as I put to first provider (administrator).

English (en-GB): Dollar
Portuguese (pt-BR): Real

When an visitor goes to my shop, if he's from U.S the prices of my products will display the price that I've put for Dollar coin, if he's from Brazil the prices of my products will display the price for the Real coin.

Example:

Product A
Price in Dollars: $10.00
Price in Reals: R$20.00

Visitor A

Location: U.S
Product Price: $10.00

Visitor B
Location: Brazil
Product Price: R$20.00

Have someone a answer for this? If it needs override or exists a plugin or something like that I can use, I'd appreciate some help.

P.S: I'm learning english, so I ask to you to try to understand, I really worked too hard to do this.
QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.

Studio 42

Why you don't use convertion rate? You have a currencies module to switch from one to other when you install Virtuemart, so it's auto calculated.

Hiago D'O.S

#2
Hi, Studio 42

I'm not good to understand english, I will try to answer you, if I understood this wrong please tell me.

The problem isn't the conversion rate, but the change from languages, what I know is that the Virtuemart supports only one currency that shows in cart by any language, the problem here is that I want two currencies with distinct prices that needs to appears in the cart, for one product. If you insert one more currency in Virtuemart, it accepts but in shop shows only the first currency what was put in currency settings.

What I want is something like with that.

http://cmsmart.net/virtuemart-extensions/virtuemart-currency-languages-conveter

But the prices must be setted manually but not converted, when the language is changed the type of coin is changed too.

If I answered something wrong, that I not understood.
Can you explain to me? Can you show me with examples? How to do it simple?

Thanks.
QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.

Studio 42

So you need to display 2 currencies at same time on product page or have 2 completely différent prices for same product not following any convertion rate?

Hiago D'O.S

Hi Studio42,

QuoteSo you need to display 2 currencies at same time on product page or have 2 completely différent prices for same product not following any convertion rate?

What I need is 2 completely different prices for same product that not following any convertion rate.

Note1: These different prices will contain 2 different currencies for same product, and will change the currency according with that 2 languages by the user language.

Price1: $10
Currency of Price1: Dollar
Required Language: English (us-US)

Price 2: R$20
Currency of Price 2: Brazilian Real
Required Language: Portuguese (pt-BR)

Note2:
When a person visits the shop and he's from U.S.A will show the current price with Dollar that not will follow any currency rate and not will show the price in Brazilian Real.

Note3:
When a person visits the shop and he's from Brazil will show the current price with Brazilian Real that not will follow any currency rate and not will show the price in Dollar.

Rules:
A person that is from Brazil can't buy a product with Dollar.
A person that is from U.S.A can't buy a product with Real.
The product must have 2 different prices, and each price will show to an especific language with an especific currency to language as I was showed above.


Thanks.
QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.

Studio 42

If you have no price relation, why not doing 2 products ?
How you want force user to select USA or Brazil  ?
How you want prevent cart confirm by product ?
This need some plugin to be sure a user only buy in one language and money.
The simplest is for eg to do 2 root category in the shop
>Brazil all product here for brazil only
>USA all product here for USA only
And check for user language.
BUt it's not so simple, because any user can fake the server and easy change root category.
So you need to control in the cart, if a user have mix the 2 (US and BR)

I don't think, a ready solution exist, if some developper read this ?

I do custom works to, but this need many time to write. So if you find a ready solution, i think it's a better choice for you.

Hiago D'O.S

QuoteIf you have no price relation, why not doing 2 products ?
How you want force user to select USA or Brazil  ?
That's ok, but and the currency?
Two providers (vendors) can't have distinct currency, I can't put different currency to those providers.

If he's from U.S.A why will he buy with Brazil currency? Is he goes to spend the money for nothing? The product isn't a software, the product is a book, it's a thing that needs to be sent to an location, and if he change to portuguese(Brazil), the shipping method will be to Brazil.

To force the user I can put a description in shipping currency, to inform about something like "only for Brazil".

QuoteHow you want prevent cart confirm by product ?

Why goes he to buy in dollar/real different then they currency? The shipping method are exclusive for each one language, he can buy with other currency but if the address points to U.S.A is easily to handle this, if he tried to buy with another currency, I think he's a fool, or I can simple override this to display an alert message before he try to do anything.

The rules of U.S.A is for all that not are from Brazil.

QuoteThis need some plugin to be sure a user only buy in one language and money.
I not know what plugin to use.

[quote ]The simplest is for eg to do 2 root category in the shop
>Brazil all product here for brazil only
>USA all product here for USA only
And check for user language.
BUt it's not so simple, because any user can fake the server and easy change root category.
So you need to control in the cart, if a user have mix the 2 (US and BR)[/quote]

Ok, two products with 2 categories in the shop I've tried this before, but if you have
two categories, you'll need two providers (multi vendors) to change the currency.

Providers(Vendors):

Provider 1 (Main provider)
Main currency: Dollar
Others currencies: None

Provider 2 (Second Provider)
Main Currency: Real (But in the Virtuemart, I can't change. The Virtuemart forces me to use what I was inserted in main currency according with the Provider 1, and it will change to Dollar in this case, even that I save in other currency)
Others Currencies: None

Categories:

Cat1
Provider(vendor): Provider 1

Cat2
Provider(vendor): Provider 2

Menu Itens:
Menu Item1
Language: English
Category: Cat1

Menu Item2
Language: Portuguese
Category: Cat2


Two providers (vendors) can't have distinct currency, I can't put different currency to those providers.

The problem is the currency, not even the category and multilanguage either.

Quote
I don't think, a ready solution exist, if some developper read this ?
I do custom works to, but this need many time to write. So if you find a ready solution, i think it's a better choice for you.

Yeah, if exists a ready solution I will be greatfully, not matter the money, that's because I want to do a business proposal to an client.

I have knowledge in override to Virtuemart 3.0 if I must to change any class or method, I can do that. But I don't know what change.
I not know what determines the prices from the products, to bring that price in cart by override or force a currency.

Thanks.
QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.

Studio 42

For the currencies changes, it's not a real problem at all.
YOU can add it using external link and using real Menu link Eg.
YOur current Joomla Menu link is yoursite.com/shop/Brazil
You use external link http://yoursite.com/shop/Brazil?virtuemart_currency_id=35 (35 is an example.)
So this switch to the right currency too.
Another solution is to check for the language and add a little plugin, checking the language and swtch the currencies if needed.
YOu can check code in YOURSITE\modules\mod_virtuemart_currencies\mod_virtuemart_currencies.php for eg.
YOu have some paid modules and plugin that can check for the user localisation (IP) too and change the currencies.

So you can do it, but the cost and time to setup it is not the same, from one solution to another

Hiago D'O.S

#8
Hi Studio 42,

I'll do some studies, I'll answer to you as soon possible, great! that answer opened new ways to do this, I not knew that.

Thanks.

QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.

Hiago D'O.S

Hi Studio 42,

Sorry, I not answered for a long time, but your answer really worked!, thanks I did what I wanted with external link :)


Thank you very much!
QuotePS: I'm learning english, so if you not understand something please reply me with your doubt and I'll answer you.