Here is some code I'd like to donate for anyone to use on their buy pages. It gets the customer's IP address, then uses cURL to get the product price for the stated quantity in the local currency from Plimus and builds a buy button with the displayed price data.
Hope someone finds it useful. Perhaps it can be improved upon.
<?php
function PlimusContractPriceForIP($contract, $quantity) {
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ipaddress = getenv(HTTP_X_FORWARDED_FOR);
} else {
$ipaddress = getenv(REMOTE_ADDR);
}
$price = '';