Post by pmchardy » Sat May 21, 2011 7:23 pm

I am wondering if anyone can help point me to where I am going wrong?

I do not want the Region / State (zone) prompt to appear in the guest checkout page.
I am happy to have all the zones set as scotland
I have a zone set as scotland

so I edited the guest_step_1.pl file


I removed the portion of code to select the zone


<td><span class="required">*</span> <?php echo $entry_zone; ?></td>
<td><select name="zone_id">
</select>
<?php if ($error_zone) { ?>
<span class="error"><?php echo $error_zone; ?></span>
<?php } ?></td>





then I added the following php code to set the zone variable to scotland.

<?php $zone_id = "Scotland"; ?>

when I do that I get the following error when I move on from








Notice: Undefined index: zone_id in /homepages/4/d114169772/htdocs/opencart/catalog/controller/checkout/guest_step_1.php on line 502
Notice: Undefined index: zone_id in /homepages/4/d114169772/htdocs/opencart/catalog/controller/checkout/guest_step_1.php on line 34
Notice: Undefined index: zone_id in /homepages/4/d114169772/htdocs/opencart/catalog/controller/checkout/guest_step_1.php on line 37
Notice: Undefined index: zone_id in /homepages/4/d114169772/htdocs/opencart/catalog/controller/checkout/guest_step_1.php on line 58
Warning: Cannot modify header information - headers already sent by (output started at /homepages/4/d114169772/htdocs/opencart/index.php:92) in /homepages/4/d114169772/htdocs/opencart/system/engine/controller.php on line 27



what am I doing wrong and how do I fix this?

Thanks

Peter

Newbie

Posts

Joined
Fri May 20, 2011 4:56 am

Post by qahar » Sat May 21, 2011 7:52 pm

instead of modificate the template or controller, why not removing all State except Scotland from database?

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by pmchardy » Sat May 21, 2011 8:15 pm

when I remove all zones from the country Scotland, the region box still appears with the requirement to choose something which is --none--

Newbie

Posts

Joined
Fri May 20, 2011 4:56 am

Post by electro_dr » Tue Dec 02, 2014 3:09 am

You write Scotland zone_id number not text. $zone_id is int from your database. Please find your country_id number and write correct number.

Newbie

Posts

Joined
Fri May 10, 2013 4:07 am
Who is online

Users browsing this forum: Bing [Bot] and 80 guests