bedford Posted April 25, 2023 Share Posted April 25, 2023 Hello, the question is in the title: why the id_currency is in the product_supplier table and not in the supplier table ? It is the supplier to define the currency, not the product at the supplier. In practice I've never seen a supplier offering different prices depending on product (and even if you have a supplier from different countries with different currencies, you can create 2 suppliers with different currencies, isn't ?). This makes a lot of duplicate data in the product_supplier table. Can anyone pointing me out why it is this way and if it will be fixed as I'm making a restock management tool and this seems to be a conceptual error to me. Link to comment Share on other sites More sharing options...
Eutanasio Posted April 29, 2023 Share Posted April 29, 2023 The choice to include the id_currency field in the product_supplier table rather than the supplier table is likely due to flexibility and modularity in PrestaShop's design. While it is true that most suppliers would define their currency and not offer different prices for different products, having the id_currency field in the product_supplier table allows for more diverse use cases, even if they are less common. For example, if a supplier offers products in multiple currencies, storing the currency information at the product level allows for more accurate tracking and management of product pricing and inventory. Additionally, it provides the flexibility to manage different pricing for different regions or sales channels. It is important to remember that e-commerce platforms like PrestaShop cater to a wide range of users with diverse requirements, so the design decisions they make may not be optimal for every specific use case. If you find that the current schema is causing issues for your restock management tool, you could consider creating a custom solution that maps the currency information from the product_supplier table to the supplier table. This could help you maintain a consistent and clean data structure for your specific use case. Also note that when building your tool, take into consideration the case of Advanced Stock Management! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now