SwissArmyKnife:
Hi. I created a duplicate store in a private location. This is my playground.
In my playground, i created a child table for Products by copying the products_description child table to products_suppliers and modifying the structure. I dropped two (2) fields and inserted nine (9) new fields, designed to contain Supplier data. I want these fields to be available to the Admin when he adds or edits a product, but they will not appear to the shopper on the front end.
Which PHP scripts must I create or edit to make this happen?
Thank you.
Its been nearly a week since this was posted and it appears that no support has been offered related to this request.
So, some basics to try to help you at least identify where changes are needed:
The existence of data in the database does not mean that the data will be readily accessible by customers visiting the site. Think about all of the tables and records that are present in a standard database, all information doesn't just get magically displayed to the product information page. It takes code to get there. Also, just because data is in the database, doesn't mean that admins have ready access to the data.
So, basically, whatever fields you add/create to whatever database table will not be visible to customers without some level of code to make them visible, and the that same thing is true for the admin side.
So, these new tables with associated fields you have created, that data will not be readily available to customers until you code to make that data available.
As for admins, well, your question is in direct relationship about how to make these fields accessible to that admins and then once accessible, how to be updateable.
You have multiple means by which to do this; however, the most "straightforward" is for the product related information to appear in relation to the product in question.
This is usually through the product information page. Now, if you only use one product type (product) which tends to be the default product type, then basically you will only need to worry about one "set" of files found in and below this directory:
YOUR_ADMIN/includes/modules/
In sequence, the files in question tend to be:
product/collect_info.php
product/preview_info.php
and
update_product.php
Now, that said, there are some other things to consider within that modules directory: how should the system respond when copying product, moving product, deleting product, etc...
I'm sure there is an entire help file on product and data collection, but the above three files (two in the modules/product sub-directory and one in the modules sub-directory) are at the base of input/output of the desired data.
Now, even with these three files, there are notifiers within the files that allow you to use an observer to interact instead of modifying those files... Moving away from file modification is an ideal situation for you and all. Basically, if you can get the operations you need without modifying a file, then ideally the next new version that comes along can be updated around your code instead of in addition to updating your code... That is at least if the modifications of the core code are made with that in mind.
Even if the core code updates cause a problem with your code then, update and development on other than your live site will prevent disruption of your income... Yes, that means somewhat having two websites (one development, one operational) but that also means you can make mistakes without affecting your income.
Anyways, a lot of words to say the above, but hopefully has either guided you to your goal or perhaps duplicated what you have already found.