Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

see if any of you guys can make this work?


sw45859

Recommended Posts

Posted

i am trying to do something like this:

 

define($text['text'], $text['text_value']);

 

where both values are coming from an sql query and the text value would look something like this:

 

text ' . PREVIOUS_DEFINE . ' text

 

the text above is in a sql table but the problem is when it is put into the define it is not "parsing" the php code. it is displaying it with the define name not the value of the define. any ideas or suggestions?

Posted

while($text = tep_db_fetch_array($text_query)){
define($text['text_key'], $text['text_content']);
}

 

 

an example of $text['text_content']

 

Enquiry from ' . STORE_NAME

 

the output into the site is exactly like above, it's not putting the defined STORE_NAME into the string

Posted

what code do you have for the query

 

edit

 

you posted as I typed

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

and i have tried putting both kinds of quotes around the text content, but it will not pick up the fact that STORE_NAME is defined

 

 

i have a feeling i am going to have to create a custom function to get this to work how i am wanting.

Posted

you say that STORE_NAME is defined, is this within the file or being pulled from somewhere else

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

it is defined from the osc configuration table which is called from the application_top.php, and i know its defined because i put an echo of just STORE_NAME next to it and it worked, it is something with the define value being pulled from the database with the STORE_NAME constant set in it.

Posted

well i made a script to do it, just have to hardcode str_replace for any value that will be used.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...