Zen Cart Logo
Forums / General Questions / can I Remove the HTML & TEXT-Only options and Radio Buttons ?

can I Remove the HTML & TEXT-Only options and Radio Buttons ?

Locked

Views: 3,118

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
15 Apr 2008, 1:32 PM
#1
jdunique avatar

jdunique

New Zenner

Join Date:
Apr 2008
Location:
Montreal, Quebec, Canada
Posts:
28
Plugin Contributions:
0

can I Remove the HTML & TEXT-Only options and Radio Buttons ?

I was wondering if I could remove the HTML and TEXT-Only radio buttons from

the form on the account registration page
and
from the form on the account modification page

Any communication will be sent in TEXT-Only, so I don't want to allow the customers the choice of format in which to receive their order-confirmation emails, etc

Is that possible?!

15 Apr 2008, 2:09 PM
#2
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,178
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

jdunique:

I was wondering if I could remove the HTML and TEXT-Only radio buttons from the form on the account registration page and
from the form on the account modification page

Any communication will be sent in TEXT-Only, so I don't want to allow the customers the choice of format in which to receive their order-confirmation emails, etc

This will fix you up:

admin panel/ configuration/ customer details/ Customer Default Email Preference1. set to 0
2. But the only problem to this is you see the fieldsTo Permanently delete from the page..

It is in /includes/ modules/ create_account.php
Copy this .php file and place in modules/ YOUR_TEMPLATE/ create_account.php.

Looks like this:

if (!isset($email_format)) $email_format = (ACCOUNT_EMAIL_PREFERENCE == '1' ? 'HTML' : 'TEXT');

You will half to edit out this comment

26 Apr 2008, 8:57 PM
#3
jdunique avatar

jdunique

New Zenner

Join Date:
Apr 2008
Location:
Montreal, Quebec, Canada
Posts:
28
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

It didn't work for me, but I'm still keeping at it and trying other things

I'll update this post when/if I find something

thanks! :)

26 Apr 2008, 10:13 PM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,178
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

jdunique:

It didn't work for me, but I'm still keeping at it and trying other things

I'll update this post when/if I find something

thanks! :)

Post me back the way you commented out the following:

includes/ modules/ YOUR_TEMPLATE_NAME/ create_account.php.

if (!isset($email_format)) $email_format = (ACCOUNT_EMAIL_PREFERENCE == '1' ? 'HTML' : 'TEXT');

Show me the text above this line, and the code above, and below the line.

  1. I need to see you technique
29 Apr 2008, 12:27 PM
#5
jdunique avatar

jdunique

New Zenner

Join Date:
Apr 2008
Location:
Montreal, Quebec, Canada
Posts:
28
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

Good morning!

I finally got it to work for me

I used <!-- to comment out a line in the following file:

/includes/templates/template_default/templates/tpl_modules_create_account.php

this is the line I edited

<?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?> 

haredo, in my create_account.php I didn't have the line that you posted.. (maybe because I'm using a custom-made template?)
I had something similar, but when I commented-it out, it had to effect..

but you did point me in the right direction, and now the problem's solved! :) :)

many thanks :smartalec: :laugh:

29 Apr 2008, 12:33 PM
#6
jdunique avatar

jdunique

New Zenner

Join Date:
Apr 2008
Location:
Montreal, Quebec, Canada
Posts:
28
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

Oh, I also needed to remove the

FIELDSET for ENTRY_EMAIL_PREFERENCE

in
/includes/templates/template_default/templates/
tpl_account_edit_default.php

so that this doesn't come up when the user is editing is account

everything seems to be working fine now :cool:

29 Apr 2008, 1:26 PM
#7
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,178
Plugin Contributions:
0

Re: can I Remove the HTML & TEXT-Only options and Radio Buttons ?

Great work, Don't you just love to read code and play:smile:. Glad you got her working correctly..