Jump to content
Sign in to follow this  
Pelvis

Convert simple Inline Code to dynamic (Take Value from the Db)

Recommended Posts

Posted (edited)

Hello Everybody ...short question:

My Inline code looks as follow:
$cashondelivery_cost = "0.50";
-------
I want to convert this to dynamic, I mean I want to get the value "0.50" from the Db.

The value "0.50" is stored on table "configuration" row called "configuration_value" of the key "CASHONDELIVERY"

Code shown like this but I can not get anything:
$cashondelivery_cost = tep_db_query("SELECT configuration_value from configuration where configuration_key='CASHONDELIVERY' ");

Any Help :-)
Thanks!

Edited by Pelvis

Share this post


Link to post
Share on other sites
$cashondelivery_cost = CASHONDELIVERY;

Don't overthink it ;) 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Anything in the configuration table is "auto loaded" ready to use, so you can just reference the configuration_key directly to get the value of it.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×