Post by thegeekz » Fri Aug 22, 2014 2:10 pm

Hi,

As my registration form in the front end (Social Login or Normal) -- all defaults to None for the Zone as Singapore has no states.


admin/view/template/sale/customer_form.tpl


It just seems that when Customer registered with -- None -- as the zone by default, what the Customer form in the back end will show :

Zone : -- Please select --

rather than -- None --

Any way to change that?

The code in question is this :

Code: Select all

                <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
 		<td><select name="address[<?php echo $address_row; ?>][zone_id]">
                  </select> 
                  <?php if (isset($error_address_zone[$address_row])) { ?>
                  <span class="error"><?php echo $error_address_zone[$address_row]; ?></span>
                  <?php } ?></td> 
I tried replacing

Code: Select all

<td><select name="address[<?php echo $address_row; ?>][zone_id]">
                  </select> 
With what is in the Store Settings :

Code: Select all

              <td><select name="config_zone_id">
                </select></td>
Didn't solve the issue -- instead shows a empty dropdown box.

Please help ...

Thank you.

Regards

Faustine

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Thu Aug 28, 2014 10:35 am

Anyone can assist, please?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Fri Aug 29, 2014 11:44 am

anyone who is well versed in the backend admin -- coding... could help please?

I need to make Customer Form -- Zone field to auto to -- None --

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Tue Sep 02, 2014 3:25 pm

Anyone?....

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by yuno » Tue Sep 02, 2014 4:43 pm

try
open opencart1564\admin\view\template\sale\customer_form.tpl

line 420

Code: Select all

    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_none'); ?></option></select></td>';
replace to

Code: Select all

    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_select'); ?></option></select></td>';

OpenCart®
PHP Developer.
更多中文教學在 OpenCart香港官方網站 !
QQ: 2039574815


Active Member

Posts

Joined
Tue Feb 11, 2014 9:24 am

Post by thegeekz » Wed Sep 03, 2014 9:59 am

Thanks Yuno for your reply.

Does this apply to OC1.5.6.1?

Code: Select all

<tr>
                <td><span class="required">*</span> <?php echo $entry_zone; ?></td>
 		<td><select name="address[<?php echo $address_row; ?>][zone_id]">
                  </select> 
                  <?php if (isset($error_address_zone[$address_row])) { ?>
                  <span class="error"><?php echo $error_address_zone[$address_row]; ?></span>
                  <?php } ?></td> 
</tr>
Its coded this way now in OC1.5.6.1....

Had to use this version as some of the customize extensions is not compatible with OC1.5.6.4.
yuno wrote: try
open opencart1564\admin\view\template\sale\customer_form.tpl

line 420

Code: Select all

    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_none'); ?></option></select></td>';
replace to

Code: Select all

    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_select'); ?></option></select></td>';

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Wed Sep 03, 2014 11:11 am

Update:

Found this somewhere in the same file in my OC1.5.6.1 version:

Code: Select all

html += '    <tr>';
    html += '      <td><span class="required">*</span> <?php echo $entry_zone; ?></td>';
    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_none'); ?></option></select></td>';
    html += '    </tr>';

So I should just change the above to

Code: Select all

html += '    <tr>';
    html += '      <td><span class="required">*</span> <?php echo $entry_zone; ?></td>';
    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="false"><?php echo $this->language->get('text_select'); ?></option></select></td>';
    html += '    </tr>';
I suppose this should be the correct coding already! Trying them now...

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Wed Sep 03, 2014 11:32 am

Done that but still not working.

See attached.

Still defaults to -- Please Select --
Image 5.jpg

Image 5.jpg (34.78 KiB) Viewed 2930 times




Edit: From Firebug, I see that the Dropdown box still has these as selection.
"" (which I guess will default to -- Please select -- )
"0" ( -- None -- )

Code: Select all

<select name="address[1][zone_id]">

    <option value=""></option>
    <option value="0">

         --- None ---

    </option>

I will need to get the -- None -- to show up as default for Singapore (which has no States).

In Account Register form in the front end, this is solved with the following codes :

Code: Select all

<div class="selectdiv">
            <select name="zone_id">
              
            </select>
</div>
Edit 2 --

Just saw in my Social Login , also in a section of my original Register form customz for Basico -- these same codings ---

Code: Select all

html = '<option value=""><?php echo $text_select; ?></option>';
      
      if (json['zone'] != '') {
        for (i = 0; i < json['zone'].length; i++) {
            html += '<option value="' + json['zone'][i]['zone_id'] + '"';
            html += '>' + json['zone'][i]['name'] + '</option>';
        }
      } else {
        html += '<option value="0" selected="selected"><?php echo $text_none; ?></option>';
      }
SO I supposed it can be changed to :

Code: Select all

    
html += '    <tr>';
    html += '      <td><span class="required">*</span> <?php echo $entry_zone; ?></td>';
    html += '      <td><select name="address[' + address_row + '][zone_id]"><option value="0"><?php echo $this->language->get('text_none'); ?></option></select></td>';
    html += '    </tr>';
Trying it now...



Any more inputs?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by yuno » Wed Sep 03, 2014 12:12 pm

As my registration form in the front end (Social Login or Normal) -- .......

It just seems that when Customer registered with -- None -- as the zone by default, what the Customer form in the back end will show :....

you are talking front end or back end?

sorry what's your expected result?

OpenCart®
PHP Developer.
更多中文教學在 OpenCart香港官方網站 !
QQ: 2039574815


Active Member

Posts

Joined
Tue Feb 11, 2014 9:24 am

Post by thegeekz » Wed Sep 03, 2014 12:24 pm

Tried all the above --- all didn't work....

Anymore inputs?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Wed Sep 03, 2014 12:26 pm

yuno wrote:As my registration form in the front end (Social Login or Normal) -- .......

It just seems that when Customer registered with -- None -- as the zone by default, what the Customer form in the back end will show :....

you are talking front end or back end?

sorry what's your expected result?
Front end is solved.

My problem now is Backend -- Customer form.

Just referencing how the problem was solved in the front end.. and trying it similarly.. but I still can't get the Zone to default to -- None --

Instead -- now its still showing -- Please Select -- then still need to select dropdown to indicate --None--

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Wed Sep 03, 2014 12:30 pm

This is what it is now in the front end :
Image 6.jpg

Image 6.jpg (31.99 KiB) Viewed 2912 times

As long as the Country selected is Singapore (with no Zones defined) since no State in the country -- Zone goes automatically to -- None --

This is what I'm trying to achieve in the Customer form in the backend

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Mon Sep 08, 2014 10:56 am

anyone?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Fri Sep 12, 2014 1:08 pm

Any one with further inputs?

I can't seem to solve this issue -- Zone : -- None -- rather than -- Please select --

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by thegeekz » Mon Sep 15, 2014 1:46 pm

Anyone?? No experts here could help?

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am
Who is online

Users browsing this forum: No registered users and 130 guests