Results 1 to 4 of 4

Thread: button to fill text box with value from database

  1. #1
    Member bonnit's Avatar
    Join Date
    Jan 2009
    Posts
    163
    Blog Entries
    4

    Default button to fill text box with value from database 8 Oct 2009 @ 08.50

    i seriously am having issues with this, im not the sql guru i would like to be, in fact a million miles from it lol and php is not my first language

    i am trying to have a button which searches a database for a customers current gift voucher balance, to quiterally be labelled apply and fill an empty text box, it has no other function as there is another button to checkout etc etc, it is for zen cart but ill worry bout replacing values etc etc later

    any help as always is much appreciated (even if its just a list of functions i should be looking at lol)

    ta x
      Reply With Quote

  2. #2
    Administrator WelshStew's Avatar
    Join Date
    Dec 2008
    Posts
    2,969
    Blog Entries
    3

    Default 8 Oct 2009 @ 09.10

    Is this to be shown back to logged in customers or within the admin panel?

    If within the admin panel, then this already exists under admin > gift certificate/coupons > gift certificates queue.
      Reply With Quote

  3. #3
    Member bonnit's Avatar
    Join Date
    Jan 2009
    Posts
    163
    Blog Entries
    4

    Default 8 Oct 2009 @ 09.16

    it is shown on their checkout page while they are logged in, there is already a field on there pulling the data from the database and its that i would either like to copy and insert into the text box, or using the same values for the logged in customer to "apply" their balance.

    not sure how much you know about zen but it uses this as far as i can see to display the value


    Line #48 : $this->checkbox = $this->user_prompt . '<input type="text" size="6" onkeyup="submitFunction()" name="cot_gv" value="' . number_format($_SESSION['cot_gv'], 2) . '" onfocus="if (this.value == \'' . number_format($_SESSION['cot_gv'], 2) . '\') this.value = \'\';" />' . ($this->user_has_gv_account($_SESSION['customer_id']) > 0 ? '<br />' . MODULE_ORDER_TOTAL_GV_USER_BALANCE . $currencies->format($this->user_has_gv_account($_SESSION['customer_id'])) : '');

    MODULE_ORDER_TOTAL_GV_USER_BALANCE is just the language call to display the text next to it

    does this mean anything to you lol, im not even sure if im on the right track ha!
      Reply With Quote

  4. #4
    Member bonnit's Avatar
    Join Date
    Jan 2009
    Posts
    163
    Blog Entries
    4

    Default 8 Oct 2009 @ 09.20

    currently the user has to manually type it in which for the users of this site may be a little confusing
      Reply With Quote

Similar Threads

  1. Button triggers button migration
    By trixiemay in forum Imagery, Graphics & Typography
    Replies: 7
    Last Post: 8 Feb 2010, @ 07.56
  2. Anyone got a moment to fill out a survey?
    By Jason in forum Coffee House
    Replies: 11
    Last Post: 17 Sep 2009, @ 09.54

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •