Bestrafung Posted October 14, 2016 Share Posted October 14, 2016 (edited) I work for a GSP and all of our prices are config options using the tcadmin2_advanced module. Whenever a price changes for a single product it can take several hours to update each table. I'm trying to make a PHP script to simplify the process. I want to provide the PID and using the pid find and list all monthly, quarterly, and annually rows. Then using a simple input for what each slot costs let the PHP script calculate and replace the values allowing for 5 and 10% savings on the quarterly and annually fields respectively. I'm not a great PHP coder by any means but I believe I have enough information to get started except I'm not sure how to populate the configoption value using the pid. Here's what I've found so far: If I use 'SELECT configoption5 FROM tblproducts WHERE id="36"' I get the configoption name (ie. ConfigOption:Halo Slots). My problem is I don't know how to find the configoption[28] number using the name. I've been examining the database trying to figure this out for an embarrassingly long time now and would appreciate any assistance. If I'm trying to re-invent the wheel and someone has already done this that would be even better. Edited October 14, 2016 by Bestrafung 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.