Price based on exchange rate

I use a single supplier for about 80% of my products. Their prices are always changing as they are based on the USD cost, I am in Australia. They have given me a price list of all their products (about 800 of them) in AUD based on a set USD exchange rate.

Most of their products are dropped shipped

What I was wanting to do is to have their products in my store and the store price changes each day based on an automated exchange rate. That way I keep up with their price changes.

So for example of a product:
Their price is $32.43 USD
Based on $1.542 USD exchange rate today they charge me $50 AUD
I add GST of 10% so cost is now $55 AUD
I add a margin of say $20
I add GST of the margin at 10% so $2 AUD
So my sell price is $77 AUD inc GST

The next day
Their price is $32.43 USD (the same)
Based on $1.7 USD the next day exchange rate so they charge me $55.13 AUD
I add GST of 10% so cost is $60.64 AUD
So now my margin comes down from $20 to $14.36. an over 25% drop in margin
And I still have to add the GST of $1.44 on the margin.

What I want is that my store automatically increases the price from $75 to $82.64

To start with I presume I would need an auto exchange rate addin but then how do I set the initial prices in my store i.e. do I use AUD or USD as the base currency? What about all my other products that are not from suppliers using USD? How do I maintain a set margin and not a % margin? How do I manage the GST Tax at 10% on cost and sell prices? etc.

Any advice is greatly appreciated…and thanks

Sorry but i have to bump this otherwise i will have no choice but to drop cs cart, which I have been with since cs cart started, and go over to OpenCart which is free and has multi store and exchange rates built in?

So Please, any advice is greatly appreciated

There are modules on the marketplace

  • to get exchange rates by cron daily
  • to save product prices in non-default currency

Thanks, so I will need two addons:

  1. A product currency selector so I will need to add that suppliers products in under a USD currency (site default currency is AUD)
  2. A daily auto exchange rate updater

Apart from being 2 addons that will have to work together the only other problems would be:

  1. My margin on the USD products would also change depending on the exchange rate so again my margin can go down, or even up making the product sell price just a little bit more expensive than the competition stores and let’s not forget the 10% GST that gets put on top of it all also adding slightly more top the sell price

Thanks for your advice and I can’t see any other way as well

Usually exchange rates modules allow to add percentage allowance to the rates

I wouldn’t add GST to the base price and then the margin. Convert product price to AUD + Margin and then calculate GST on the total.

The API is pretty easy to use, your solution is as follows

  1. create file as above
  2. save as csv file on your server
  3. create a html form where you can enter the exchange rate daily
  4. read following fields and product ID from your csv file (ask chat gpt how to do that in PHP if you don’t know how)
  5. create formula (($price * $exchangeRate)+ $margin) * 1.1) = $newprice
  6. create an array with the product number and price
  7. pass it to this function
  8. loop to step 4

function updateCSproduct($ch, $url, $email, $password, $passedProduct, $productID) {
// update passed product in cs-cart via API
if ($productID){
$credentials = base64_encode(“$email:$password”);
$authHeaderString = 'Authorization: Basic ’ . $credentials;

    // Update an existing product (Curl PUT).
    $api_url = "{$url}/api/2.0/products/{$productID}";

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array($authHeaderString, 'Content-Type: application/json'));
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($passedProduct));

    $response = curl_exec($ch);

    if ($response === false) {
        die("function updateCSproduct cURL error: " . curl_error($ch));
    } else {
        $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);  
        if ($http_status == 200) {      
            // Product updated successfully
            //echo "Stock level has been updated successfully<br>";
        } else {
            // Report Error
            echo "HTTP Status: ".$http_status."<br>";
            echo $productID."<br>";
            echo "<br>";
            echo "Error Response: $response<br>";