Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Unknown Function on convert_from_currency 27 Jul 2018 15:23 #1

  • icetrikes
  • icetrikes's Avatar Topic Author
I'm getting an error message on the Virtuemart cart page.

Warning
Unknown function 'convert_from_currency' encountered during evaluation of rule '[small items]; Amount<=50; Shipping=convert_from_currency(25, "USD")'.

The rule that is triggering it is:

[small items]; Amount<=50; Shipping=convert_from_currency(25, "USD")
[larger items]; 50<Amount<=500; Shipping=convert_from_currency(35, "USD")
[trikes]; Amount>500; Shipping=convert_from_currency(149, "USD")

I tried this convert_to_currency as well, but I get the same error. Setting the Joomla error reporting to 'Development' doesn't change the error message.

In this case, I need to have the shipping prices in USD for US customers. The shop default currency is GBP. I've only had the extension for a day, and it is doing everything I want from expect for this. Its entirely likely that I haven't used the function correctly. I had previously tried

[small items]; Amount<=convert_from_currency(50, "USD"); Shipping=convert_from_currency(25, "USD")

which is really what I want to do; is the amount is less that 50 USD, then the shipping is 25 USD. The examples and documentation is slightly confusing because it doesn't show the effect of Currency field at the bottom of Shipment Method Information.

Cheers

John


Joomla 3.8.10
Virtuemart 3.2.14
PHP 7.1.5
Advanced Shipping by Rules 6.2.4

Unknown Function on convert_from_currency 10 Sep 2018 18:12 #2

Dear John,
Sorry to hear about your problems. It seems that we have a small, but crucial typo in the documentation: In our code, we called the two conversion functions "ConvertFromCurrency" and "ConvertToCurrency" (upper-/lowercase is irrelevant, but no underscored....).

We'll add convert_from_currency and convert_to_currency in our next version (as aliases for ConvertFromCurrency and ConvertToCurrency). For now, you can simpy use ConvertFromCurrency.

Best regards,
Reinhold
  • Page:
  • 1