Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contrib]Product Exchange Rates At A Glance


wheeloftime

Recommended Posts

Support thread for Product Exchange Rates At A Glance

 

For now this will add a small table view to your product info page only with the exchange rate information for all valuta, except the shop's default valuta, you have installed in your shop.

It only appears when the default currency is active.

 

The idea is to enhance this further to be able to get rid of the currency selection box (while still having mulitple currencies installed in the shop) in order to be able to use the default currency alone for payments while the customer still has an oversight of the costs in other currencies.

This is mainly because using Paypal means that when getting payments in other valuta as your local bank valuta it will cost you a lot extra when funds are withdrawn from Paypal to your local bank account.

 

Any (other) ideas are welcome !

 

Contrib can be found here

Edited by wheeloftime
Link to comment
Share on other sites

Update to Product Exchange Rates At A Glance v1.1

 

- style sheet font size adjusted to 10px

- the exchange rate table now only shows when the choosen language is not the default shop language besides the default currency check

- besides the product info page the exchange rate table now also shows on the product listing pages, the checkout shipping page, the shopping cart page, the checkout confirmation page (only for the total) and for the new products page

 

For a preview you can go to h**p://www.wheeloftime.nl/osctest/

Link to comment
Share on other sites

  • 3 months later...

Hi, just one quick question -

 

I installed it on shipping_cart.php, but the listing doesn't got picked up on the final price, i.e. the exchange rates remain at "per item" price. I am not sure if I have done anything wrong.

 

In addition, may I know how to add the exchange rate on the sub-total on shopping_cart.php please?

 

Thanks a lot!

 

Ken

Edited by ken.yong
Link to comment
Share on other sites

Hi, just one quick question -

 

I installed it on shipping_cart.php, but the listing doesn't got picked up on the final price, i.e. the exchange rates remain at "per item" price. I am not sure if I have done anything wrong.

 

In addition, may I know how to add the exchange rate on the sub-total on shopping_cart.php please?

 

Thanks a lot!

 

Ken

Hi Ken,

 

No, you have done everything right. In the latest version I submitted to the contribution area this just isn't yet implemented. On the demo page I did implement it and as I am not sure when and if I will update this package anymore you can look in your (catalog)/shopping_cart.php for

			echo $currencies->format($cart->show_total());

and replace that for

//			echo $currencies->format($cart->show_total());
		  $cart_total = $cart->show_total();
		echo $currencies->format($cart_total) . tep_get_value_exchange_rates($cart_total);

 

HTH

Link to comment
Share on other sites

THANKS SO MUCH!!!!!!!!!!!!!!!! :D

 

Just last question - My item listing on the shopping cart page, say "Die Hard DVD" has a price of $1.00. I increased the quantity to 3 so the total for Die Hard DVD is $3.00. However, the exchange rates do not change at all, i.e. remains at 1.70 pound rather than showing 5.10 pound.

 

Did I miss anything here?

 

THANKS AGAIN!

 

Ken

Link to comment
Share on other sites

THANKS SO MUCH!!!!!!!!!!!!!!!! :D

 

Just last question - My item listing on the shopping cart page, say "Die Hard DVD" has a price of $1.00. I increased the quantity to 3 so the total for Die Hard DVD is $3.00. However, the exchange rates do not change at all, i.e. remains at 1.70 pound rather than showing 5.10 pound.

 

Did I miss anything here?

 

THANKS AGAIN!

 

Ken

 

No, correct again. I hadn't noticed that myself until you told me now :D

I'll have a look at the shopping cart page to see what is going on, it should refresh with the rest of the page.

Link to comment
Share on other sites

i got a quick question for you guys using this:

 

have you noticed a higher rate of purchases or orders as a result of displaying this?

 

i often have emails "canadian or american prices?" or people abandoning carts and explaining the currency is why... but due to the intelligence of most of my visitors, i have to wonder if they'd confuse the more expensive conversed rates to be what the actual price is.

Link to comment
Share on other sites

i got a quick question for you guys using this:

 

have you noticed a higher rate of purchases or orders as a result of displaying this?

 

i often have emails "canadian or american prices?" or people abandoning carts and explaining the currency is why... but due to the intelligence of most of my visitors, i have to wonder if they'd confuse the more expensive conversed rates to be what the actual price is.

 

Speaking for myself; I don't know as I do not use it (yet) in my live shop. I have some ideas I need to play with first although it should be useable as it is now.

For the dollar confusion you could also maybe simply change the dollar sign to something like US$, CAN$, AUS$ etc.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I tried to fix why the exchange rate price doesn't change along when product quantities change in shopping_cart.php. I have modified the following for individual product in shopping cart:

 

'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');

 

to

 

'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>' . tep_get_product_exchange_rates($products[$i]['id'], $products[$i]['final_price']*$products[$i]['quantity']));

 

All I did was adding: $products[$i]['final_price']*$products[$i]['quantity'] in the tep_get_product_exchange_rates function above.

 

It worked well for normal price products. However, the exchange rate price doesn't change along with quantity change in the shopping cart for special price products!!!

 

I have tried to substitute ['final_price'] to ['new_price'] to no avail.

 

Please kindly help! This is the last piece of the puzzle!

Link to comment
Share on other sites

I have also singled out the problem in the codes in general.php under function tep_get_product_exchange_rates:

 

 if ($new_price = tep_get_products_special_price($products_id)) {
  $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($new_price, true, $key) . '</DIV></TD></TR>';
} else {
  $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($products_price, true, $key) . '</DIV></TD></TR>';
}

 

If I take out the if statement above and just keep

 

   $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($products_price, true, $key) . '</DIV></TD></TR>';

 

The shopping cart problem is gone (and the exchange rate price calculated is absolutely right based on the special price)! HOWEVER, the product_info.php page's exchange rate price will be calculated from the normal price instead of the special price.

 

If I keep the if statement as it is, the product_info.php page's exchange rate price will be calculated from the special price instead of the normal price but the shopping cart price will not change along with quantity change!

 

This is the best that I can diagnose. I hope someone can help!

Link to comment
Share on other sites

I have also singled out the problem in the codes in general.php under function tep_get_product_exchange_rates:

 

 if ($new_price = tep_get_products_special_price($products_id)) {
  $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($new_price, true, $key) . '</DIV></TD></TR>';
} else {
  $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($products_price, true, $key) . '</DIV></TD></TR>';
}

 

If I take out the if statement above and just keep

 

   $ret_string .= '<TR><TD><DIV ALIGN="right">' . $currencies->format($products_price, true, $key) . '</DIV></TD></TR>';

 

The shopping cart problem is gone (and the exchange rate price calculated is absolutely right based on the special price)! HOWEVER, the product_info.php page's exchange rate price will be calculated from the normal price instead of the special price.

 

If I keep the if statement as it is, the product_info.php page's exchange rate price will be calculated from the special price instead of the normal price but the shopping cart price will not change along with quantity change!

 

This is the best that I can diagnose. I hope someone can help!

 

Alright, since I am not a programmer at all (not at all), I used the most basic method to get this resolved:

 

In general.php, REPLICATE function tep_get_product_exchange_rates. Renamed the function as something like tep_get_product_exchange_rates_shopping_cart. Played around according to the codes in the above post until the shopping cart problem is gone. Then use this tep_get_product_exchange_rates_shopping_cart instead of tep_get_product_exchange_rates in your shopping_cart.php.

 

I hope this helps someone.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...