Forums / Bug Reports / [Done v1.6.0] customer referral snip in edit account

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

Started by keneso on 1 Aug 2015, 6:08 PM · Views: 780

Results 1 to 3 of 3
1 Aug 2015, 6:08 PM
#1
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

[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 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 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="customers-referral" class="form-control"" maxlength="32" size="16" value="" name="customers_referral">
so it appeared to me that the ```
type"text"

```php
<?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

1 Aug 2015, 7:04 PM
#2
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: [Done v1.6.0] 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.

1 Aug 2015, 9:40 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

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

keneso:

/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.