Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default [Done v1.6.0] customer referral snip in edit account

    Hi,

    Premise:
    I am not a coder.

    Anyhow, while trying to customize tempates/tpl_account_edit_default.php at line 68 (v 1.54)
    PHP Code:
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral'15), 'id="customers-referral"'); ?>
    I added a class to the field like this
    PHP Code:
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral'15), 'text id="customers-referral" class="form-control"'); ?>
    and it would not behave like the other fields, when inspecting in firebug I noticed it reported the source like this
    <input type="id=&quot;customers-referral&quot; class=&quot;form-control&quot;" maxlength="32" size="16" value="" name="customers_referral">
    so it appeared to me that the
    Code:
    type"text"
    is not outputted correctly; when I corrected the line like this
    PHP Code:
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral'15) . 'id="customers-referral" class="form-control"'); ?>
    it seems to be outputted correctly, and the styling is working fine.

    In case it is hard to notice I changed the , (comma) after 'customers_referral', 15) to . (period)

    Is that an error, or am I messing things up?

    Thank you

  2. #2
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: customer referral snip in edit account

    It seems it is an error.

    In templates/tpl_modules_create_account.php the code is with a period like I did in tempates/tpl_account_edit_default.php

    Anyhow, waiting for your expert input.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: customer referral snip in edit account

    Quote Originally Posted by keneso View Post
    /includes/tempates/tpl_account_edit_default.php at line 68 (v 1.54)

    ... I changed the , (comma) after 'customers_referral', 15) to . (period)
    Yes, it is a bug, which only shows up when you're using the customer-referral feature and attempting to style that particular field.

    Your fix is correct.

    We'll incorporate the fix in v1.6.0: https://github.com/zencart/zencart/pull/519
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 12 May 2014, 09:18 AM
  2. v139h How to make customer referral a required field during create account?
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Jan 2012, 09:47 PM
  3. Replies: 13
    Last Post: 4 May 2010, 10:47 AM
  4. Replies: 2
    Last Post: 19 Aug 2006, 09:01 PM
  5. [DONE] Bug in referrals field of account-edit template
    By GlassHoppah in forum Bug Reports
    Replies: 2
    Last Post: 25 Jun 2006, 08:48 AM

Posting Permissions

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