Jump to content

Archived

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

hungryfrank

tep_cfg_textarea( problem

Recommended Posts

i have a problem with using  tep_cfg_textarea(  

when i use this then the value that i put in the field is not entered in my db. i guess there is something wrong with my code.

the value that i want to enter is a string about 600 characters. when i don't it works just fine, but it is ugly.

tep_db_query("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('User Token for sandbox', 'EBAY_SANDBOX_USER_TOKEN', '1', 'The User Token for ebay sand box not production.', '6869', '5','tep_cfg_textarea(', now())");

you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Share this post


Link to post
Share on other sites

@@hungryfrank,

 

I guess the purpose of this function is not to be used in a module's configuration entry, at least I couldn't find any example where it is used.

Just use this:

tep_db_query("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('User Token for sandbox', 'EBAY_SANDBOX_USER_TOKEN', '1', 'The User Token for ebay sand box not production.', '6869', '5', now())");

This produces a normal input field and works.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

yes thanks. that is what i did. problem is that when you finish editing then because of the length of the string the page shifts so much that is hard to find the edit buttom again. oh well :(  


you can cut up to 4 pages of your checkout by using my three add_ons

login create account in one page

Express checkout  

login pop up modal

Share this post


Link to post
Share on other sites

@wHiTeHaT,

I played with your fix and found that the text size is not an issue of browser settings. It shows much bigger in Firefox, but also noticeable bigger than other text in all other browsers. It can't be fixed in the browser settings. If I reduce the default text size in the browser, all text gets proportionally reduced. So the fix I found is:

      return tep_draw_textarea_field($name, false, 35, 5, $text, 'style="font-size: 11px;"');

If your fix will be core, of course it should be added to the stylesheet.

Share this post


Link to post
Share on other sites

Ii Firefox, adding

'style="font-size: 11px;"'

don't work for me.

The fix for me is to add this to the admin/includes/stylesheet.css

textarea {
  margin: 0;
  font: inherit;
  color: inherit;
}

 


Live   : OsC 2.2, php 5.6 & UTF-8  |  Local : phoenix and oscommerce v4 test when v4 will be available

Share this post


Link to post
Share on other sites

Doesn't work.

What works for me is:

      return tep_draw_textarea_field($name, false, 35, 5, $text, 'style="font: inherit;"');

for sure better than a fixed size.

Share this post


Link to post
Share on other sites

×