Jump to content

ConfigOption Bulk Price Updater


Bestrafung

Recommended Posts

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 by Bestrafung
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated