Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Location
    Kaneohe, Hawaii USA
    Posts
    22
    Plugin Contributions
    0

    [DONE] Bug in referrals field of account-edit template

    /includes/modules/pages/account_edit/header_php.php

    I had what appeared to be a seamless upgrade from 1.3.0.1 to 1.3.0.2 the other day. Quite impressive with the list of changed of changed files (applauds the dev team for making it so simple). I have a slight problem though...

    When testing the account edit page, the referral code is listed twice in the form--once with a form field and once with just the referral code text.

    ie:

    referral code: [blank form field]
    referral code:

    I'm not sure if this was something I did during the file merge, or if it was an oversight or glitch in the upgrade file? Is it possible this is supposed to list an existing code that perhaps wasn't in the previous version? I'm sure it's something minor, but I just can't see it.

    Any help would be appreciated. PM me for a login/password if needed.
    Thanks,
    -Christine
    808's ZenCart: http://808StockPhoto.com/gallery/
    Royalty Free Stock Photos at 808 Stock Photography: http://808StockPhoto.com/

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Idea or Suggestion Re: Glitch in upgrade or my bad merge?

    Hmm .... well .... that would be a bug !


    It only occurs if you have the "Customers Referral Status" from Admin->Configuration->Customer Details page set to "2"

    includes/templates/template_default/templates/tpl_account_edit_default.php
    starting on line 64, you have:
    PHP Code:
    <?php
      
    if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral == '') {
    ?>
    <label class="inputLabel" for="customers-referral"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral'15), 'id="customers-referral"'); ?>
    <br class="clearBoth" />
    <?php ?>

    <?php
      
    if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral == '') {
    ?>
    <label for="customers-referral-readonly"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>
    <?php echo $customers_referralzen_draw_hidden_field('customers_referral'$customers_referral,'id="customers-referral-readonly"'); ?>
    <br class="clearBoth" />
    <?php ?>
    The fix is to change the SECOND line saying this:
    PHP Code:
      if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral == '') { 
    to this:
    PHP Code:
      if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral != '') { 
    (note: the != instead of == )


    Thus, the same block of code becomes:
    PHP Code:
    <?php
      
    if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral == '') {
    ?>
    <label class="inputLabel" for="customers-referral"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral'15), 'id="customers-referral"'); ?>
    <br class="clearBoth" />
    <?php ?>

    <?php
      
    if (CUSTOMERS_REFERRAL_STATUS == and $customers_referral != '') {
    ?>
    <label for="customers-referral-readonly"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>
    <?php echo $customers_referralzen_draw_hidden_field('customers_referral'$customers_referral,'id="customers-referral-readonly"'); ?>
    <br class="clearBoth" />
    <?php ?>
    </fieldset>

    <fieldset>
    <legend><?php echo ENTRY_EMAIL_PREFERENCE?></legend>
    <?php echo zen_draw_radio_field('email_format''HTML'$email_pref_html,'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' ENTRY_EMAIL_HTML_DISPLAY '</label>' zen_draw_radio_field('email_format''TEXT'$email_pref_text'id="email-format-text"') . '<label  class="radioButtonLabel" for="email-format-text">' ENTRY_EMAIL_TEXT_DISPLAY '</label>'?>
    <br class="clearBoth" />
    .

    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.

  3. #3
    Join Date
    Apr 2006
    Location
    Kaneohe, Hawaii USA
    Posts
    22
    Plugin Contributions
    0

    Idea or Suggestion Re: Bug in referrals field of account-edit template

    That did the trick. Thank you very much!
    808's ZenCart: http://808StockPhoto.com/gallery/
    Royalty Free Stock Photos at 808 Stock Photography: http://808StockPhoto.com/

 

 

Similar Threads

  1. [NOT A BUG] Minor bug in account edit template
    By jdcncsolutions in forum Bug Reports
    Replies: 3
    Last Post: 2 May 2010, 01:37 AM
  2. Edit/Update Account Doesn't Work after Adding a new Account Field
    By webomat in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 19 Apr 2007, 04:51 AM
  3. Replies: 59
    Last Post: 30 Dec 2006, 05:24 PM
  4. Replies: 2
    Last Post: 19 Aug 2006, 09:01 PM
  5. [DONE] My Account bug
    By kuroi in forum Bug Reports
    Replies: 3
    Last Post: 8 Jul 2006, 09:55 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR