Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need 2 prices, not 2 currencies


rstevenson

Recommended Posts

Posted

Hi,

 

Our greeting cards are already bar-coded and priced on the back with two prices: $2.95 CAD and $2.50 US. So using the currency conversion part of OSC doesn't necessarily apply.

 

I'd like customers in the US to buy at the US$ price (2.50) and all other customers to buy at the Canadian price (2.95) with conversion available to Euros if they are in the EU. (We've never had a customer outside of the US and Canada, but think positive!)

 

I envision something like a second price column in the database, and when a US customer logs in they automatically get that price. Everyone else gets the CAD price, optionally converted.

 

Any ideas on how to set this up would be appreciated.

 

TIA

 

Rob

Posted
Hi,

 

Our greeting cards are already bar-coded and priced on the back with two prices: $2.95 CAD and $2.50 US. So using the currency conversion part of OSC doesn't necessarily apply.

 

I'd like customers in the US to buy at the US$ price (2.50) and all other customers to buy at the Canadian price (2.95) with conversion available to Euros if they are in the EU. (We've never had a customer outside of the US and Canada, but think positive!)

 

I envision something like a second price column in the database, and when a US customer logs in they automatically get that price. Everyone else gets the CAD price, optionally converted.

 

Any ideas on how to set this up would be appreciated.

 

TIA

 

Rob

 

I'm considering implementing that myself. Have you found an answer to accomodate this?

Posted
Hi,

 

Our greeting cards are already bar-coded and priced on the back with two prices: $2.95 CAD and $2.50 US. So using the currency conversion part of OSC doesn't necessarily apply.

 

I'd like customers in the US to buy at the US$ price (2.50) and all other customers to buy at the Canadian price (2.95) with conversion available to Euros if they are in the EU. (We've never had a customer outside of the US and Canada, but think positive!)

 

I envision something like a second price column in the database, and when a US customer logs in they automatically get that price. Everyone else gets the CAD price, optionally converted.

 

Any ideas on how to set this up would be appreciated.

 

TIA

 

Rob

 

well if you dont care about the currency conversion portion, look for a contrib that allows you to add retail prices and product costs to your store. I dont remember the exact name. The reason I suggest this one is that the instructions are pretty easy to follow and would allow you to add additional "prices" for each product. Just replace the words "retail" with CDN or something.... just a though....

Posted

I have implemented this (I just haven't finished the rest of the site, so I'll post URL's soon). I'm sure there's an elegant solution to doing this (one that allows all currencies to have a price) but my client only needs to worry about CAD and USD.

 

Here's that I did in general. The "Currencies" drop-down box sets a global variable called "$currency" to a three letter code. If you enable Canadian and US currencies, they are CAD and USD respectively. My "brute-force" option was to use that 3 letter code to augment any calls to "product_price" from the database. I needed to add the following fields to certain database tables. I created two new fields each for the "products" and "specials" tables. Called "products_cad_price" and "products_usd_price" / "specials_new_products_cad_price" and "specials_new_products_usd_price".

 

Next, using "Agent Ransack" (a very effective search tool that lets you search on text strings far better than the built-in Windows search) I did a search for all instances of "products_price" and replaced it with

 

"...products_" . strtolower($currency) . "_price..."

 

so that any calls made to "products_price" get changed to "products_cad_price" or "products_usd_price" (similarly for the specials).

 

There's many changes to be made, but it DOES work. I have it running and tested on my test version of a site (I'll release URL's soon). A user can flip currencies anytime and it changes the cart, products, everything on the fly. However, once an order is made, the order is written to the orders table at a fixed price and a fixed currency. You can't flip back and forth anymore (which is a good thing).

 

The other stuff (adding new form fields in the admin, etc...) is just more work. I say it offhandedly because I'm not a stranger to PHP.

 

I am a real fan of osCommerce and have designed two sites with it. Once I finish this one, I'll do my best to write a contrib for this feature, but wanted to get the message out that there is a way of doing it., and perhaps stimulate someone into thinking of a better way.

 

Hi,

 

Our greeting cards are already bar-coded and priced on the back with two prices: $2.95 CAD and $2.50 US. So using the currency conversion part of OSC doesn't necessarily apply.

 

I'd like customers in the US to buy at the US$ price (2.50) and all other customers to buy at the Canadian price (2.95) with conversion available to Euros if they are in the EU. (We've never had a customer outside of the US and Canada, but think positive!)

 

I envision something like a second price column in the database, and when a US customer logs in they automatically get that price. Everyone else gets the CAD price, optionally converted.

 

Any ideas on how to set this up would be appreciated.

 

TIA

 

Rob

Posted

Hi Ryan,

 

Thanks for the feedback on pricing products in two currencies. I'll have a go at it based on what you've outlined, though I may have to come back with more questions, especially since I'm a long way from being expert with PHP.

 

I suspect I won't bother trying to make any changes to Admin, since our prices are all the same and change only rarely. I can insert them, and modify when necessary, using phpmyadmin, and it'll probably be a lot easier than modifying Admin.

 

Rob

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...