Jump to content

How do I convert $ to ? in Jon Lebensold's shopping cart tutorial?


slam38

Recommended Posts

Hi everyone,

 

I am working from Jon Lebensold's shopping cart tutorial, which is great by the way, and I'm very new to PHP.

 

This might seem like a stupid question, but in the video Jon is working with the currency dollars ($). I want to use pounds (?).

 

How do I convert $ to ?? And what is the currency_code for ? for PayPal?

 

I did attempt to change the $$amount to this $?amount in the table output on the templates page, but nothing happened.

 

I also tried to put ? in the XML catalog but in the browser a greek letter A was displayed in front of the ?.

 

Thanks for your time.

Edited by slam38
Link to comment
Share on other sites

This is just a guess, but might be worth a try.

 

Special characters like ? are often unrecognised and you have to use the character code in html which is £ for ? but although this will work in text I'm not sure if it will affect the PHP processing.

 

I also believe that the PHP encoding needs to be utf-8 and not iso-8859-1.

 

I think one solution is not to use ? in a variable like $?amount just use $amount and put the ? sign as £ in a text string like

$current_prices = array("Bed"=>"£200.00",

"Chair"=>"£100.30", "Table"=>"£450.00");

 

as this doesn't work:-

 

$current_prices_in_£ = array("Bed"=>"£200.00",

"Chair"=>"£100.30", "Table"=>"£450.00");

Edited by Wickham
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
×
×
  • Create New...