I have a module in a shopping cart program where a sellers logs in and adds product. As usual the seller logs in with an email and password which is stored in the mysql table _supplier_admin s. This table also contains the field supplier_admin_ name.
When the seller adds product they currently have the choice to select a manufacturer. For later reporting reasons I am attempting to change the default manufacture depending on the seller logged in. The manufacturer is stored in the mysql table _manufactuers. It should be noted this same table also contains manufactuer_id and manufacture_nam e. I have created product manufactures in the cart that match each sellers_admin_ name.
It should also be noted that the cart that I am using uses the manufactuer_id to select, store, display and report on information not the manufacture_nam e.
As stated I am attempting to create code that will change the default manufacturer based on the seller that is logged in. Both of the fields that I want to compare are VARCHAR(32). I am not sure if this matters but one is of collation latin1_swedish_ ci and the other is utf8_general_ci .
I want the code to do the following:
If the supplier_admin_ name from table _supplier_admin sis equal to manufacture_nam e from table _manufactuers then the default manufacturer will be equal to the corresponding manufactuer_id. Corresponding meaning from the same record as the matching manufacture_nam e.
I know very little about php and I am hoping to get help with this. I am using the Zen Cart shopping cart software. MySQL client version: 5.0.45 and PHP Version 5.25
Any help with this code would be appreciated.
Thanks in advance, dbanrman.
When the seller adds product they currently have the choice to select a manufacturer. For later reporting reasons I am attempting to change the default manufacture depending on the seller logged in. The manufacturer is stored in the mysql table _manufactuers. It should be noted this same table also contains manufactuer_id and manufacture_nam e. I have created product manufactures in the cart that match each sellers_admin_ name.
It should also be noted that the cart that I am using uses the manufactuer_id to select, store, display and report on information not the manufacture_nam e.
As stated I am attempting to create code that will change the default manufacturer based on the seller that is logged in. Both of the fields that I want to compare are VARCHAR(32). I am not sure if this matters but one is of collation latin1_swedish_ ci and the other is utf8_general_ci .
I want the code to do the following:
If the supplier_admin_ name from table _supplier_admin sis equal to manufacture_nam e from table _manufactuers then the default manufacturer will be equal to the corresponding manufactuer_id. Corresponding meaning from the same record as the matching manufacture_nam e.
I know very little about php and I am hoping to get help with this. I am using the Zen Cart shopping cart software. MySQL client version: 5.0.45 and PHP Version 5.25
Any help with this code would be appreciated.
Thanks in advance, dbanrman.
Comment