Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8377223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:36:51+00:00 2026-06-09T15:36:51+00:00

If this question seems like a possible duplicate, I’m sorry. please link me to

  • 0

If this question seems like a possible duplicate, I’m sorry. please link me to the original.

I am developing a shopping cart with php and mysql.

In the admin panel, multiple currency types can be set, and new currency types can be added. It will have a default currency and a coversion rate.
My problem is when changing the default currency type.

This is what my tables look like

**Currency**
------------------------------------------------------------------------------
ID    CurrencyType        ConversionRate           IsDefault
------------------------------------------------------------------------------
1       type1                 -                      y
2       type2                 2.0                    n
3       type3                 3.0                    n
------------------------------------------------------------------------------

**Product**
------------------------------------------------------------------------------
ID     Rate        
------------------------------------------------------------------------------
1      100
2      200      
------------------------------------------------------------------------------

Here for the price for product 1 will be

(100) for currency type1
(100 * 2.0) for currency type2
(100 * 3.0) for currency type3

In the admin panel, the conversion rates will added with respect to the default currency type.

Here while changing the default type, I can update the conversion rates in the currency table.
But I am having to update the rate in the product table. Changing the rates for all products in the product table, made me feel that I am wrong.

Is there any other better way to do.? please advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:36:53+00:00Added an answer on June 9, 2026 at 3:36 pm

    I found a solution with which i need not update the product table.. I am gonna have a HIDDEN currency type which will be the default for the calculations.. The rate in the product table will be always be *1 to this currency type

    Can make the necessary calculations in the admin panel so that the admin can still enter the rate of the new product in his default currency type..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this question it seems like you can do this for Methods. What
Following up to this question , it seems like Select-Object sets its input to
So, I'm not sure how to ask this question, as it seems like it
This seems like a repeated question but i'm not able to get my answer.
This seems like a basic question, but I haven't found any clear answers. Essentially,
This seems like a basic question, but it's still bugging me. Why doesn't MyObject
This seems like a simple question, but it is difficult to search for. I
This seems like a newbie question except that I've been trying to wrap my
This seems like a simple question, but has proven to be difficult to find
This seems like the simplest Git question, but I can't find ANYTHING on it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.