Page 1 of 1
1.5.0.5 How to remove dropdown geozone and country?
Posted: Fri Jul 15, 2011 7:48 am
by jenstm
Hello
I have seen the question before and have tried to fix it, but i seems like the fix I found here..:
http://forum.opencart.com/viewtopic.php?t=14704
http://forum.opencart.com/viewtopic.php ... 2&start=20
...does not work version 1.5.0.5. I seems only to work on 1.4.x
In Denmark the shipping is the same price nomatter where in Denmark you ship to, also I am only going to sell in Denmark so therefor I would like to remove the drop down boxes.
I hope some brilliant brain will help me out
Best Regards,
Jens
Denmark
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sun Jul 17, 2011 6:57 am
by merry
Hi Jens,
When you say it does not work, what part does not work--what happens? It will help us to help you if you please tell us what you did and where it breaks, so we can just start from the breaking point.
Kerry
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Wed Jul 20, 2011 6:08 am
by IsoNick
I've been helping Jens on this issue.
The problem is, that those lines that you can replace in version 1.4.x, don't seem to be in 1.5.x - or maybe they are, we just can't find them. We wan't to strip off the region and country selector during check out.
The test board is online at this url:
http://oc.amusant.dk
Thanks
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Wed Jul 20, 2011 1:32 pm
by i2Paq
If you set it to work with only Denmark maybe removing the lines from the theme's .tpl that shows them would be enough?
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Thu Jul 21, 2011 3:00 am
by peecha85
If you set it to work with only Denmark maybe removing the lines from the theme's .tpl that shows them would be enough?
this worked in 1.4.x, but not in 1.5.x
If you remove the lines or comment out, you are no longer able to proceed the checkout process- the continue button doesn't work. it's not only because these fields are mandatory- this happens to all fields (fax, company etc)
I am also looking forward to see the answer, because I don't need such fields as fax, company or address 2.
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Thu Jul 21, 2011 5:13 am
by freshbreeze
If you disable all countries except Denmark then the other countries won't be in the dropdown. Sorry I don't know how the drop down will behave then after with just one active country.
BACK UP and you could run this sql in the databse:
Code: Select all
UPDATE country SET status = '0' WHERE status = '1';
UPDATE country SET status = '1' WHERE name = 'Denmark';
You could then then run something similar to disable the Danish zones. Always better to disable than delete.....
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sat Jul 23, 2011 12:58 pm
by IsoNick
Thanks for the SQL tip. Will give it a try, to see if it's working. But the best, would be to remove the boxes completely.
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sat Jul 23, 2011 3:10 pm
by uksitebuilder
You could maybe replace those boxes with hidden input fields of the same names instead and pre-fill their values to match
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sat Jul 23, 2011 3:12 pm
by IsoNick
Would you hide them with CSS?
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sat Jul 23, 2011 3:19 pm
by uksitebuilder
Code: Select all
<input type="hidden" name="country_id" value="57">
<input type="hidden" name="zone_id" value="903">
Delete the original select inputs from your tpl and pop the above hidden inputs next to postcode input so you can shorten the form a little
I selected Arhaus for the zone because it is a required field.
Further coding could sort this out proplery, but I have little time today I'm sorry
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sat Jul 23, 2011 3:25 pm
by IsoNick
It's okay. Thanks for the work around. Will give it a try.
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sun Jul 24, 2011 9:11 pm
by freshbreeze
I also want to remove the region/ state drop down as it really isn't necessary for most of the EU countries inc UK.
I have disabled all countries except EU countries and disabled all zones in database using phpmyadmin. But the Region / State selector in shipping estimator & checkout requires you to choose a state called "None" which is pointless. I had hoped this field would not appear if no zones were active.
Sorry but I didn't understand UKsitebuilders suggestion
Please can you explain it a bit more?
I also want postcode to be required for checkout addresses but not shipping estimator. Anyone got a nice clean way of doing this too please?
Thanks
1.5.0.5 as well
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Sun Jul 24, 2011 11:47 pm
by IsoNick
uksitebuilder wrote:Delete the original select inputs from your tpl and pop the above hidden inputs next to postcode input so you can shorten the form a little
Oh, in which tpl file by the way? More than one?
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Mon Jul 25, 2011 2:54 pm
by peecha85
Delete the original select inputs from your tpl and pop the above hidden inputs next to postcode input so you can shorten the form a little
didn't work for me- wasn't able to proceed the checkout (continue button didn't respond)
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Mon Jul 25, 2011 2:59 pm
by IsoNick
peecha85 wrote:didn't work for me- wasn't able to proceed the checkout (continue button didn't respond)
Oh, good I didn't start to work on the problem yesterday then.
What now then, anyone got other solutions for this annoying issue?
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Mon Jul 25, 2011 6:02 pm
by peecha85
I really don't know how to hide the form fields. I could remove the texts (Fax, Company, Address etc.), but the form fields have to be visible, or else the continue button doesn't work.
I think there should be something deleted not only from .tpl files, but also from related .php files, but I have no idea what exactly
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Thu Aug 04, 2011 9:04 pm
by Goffer
Been playing with the exact same thing today.
I would asume that the easiest way is to make the field "Non mandatory" and then hide dropdown in the register.tpl file.
But i dont know how to make the fields mandotory, i can see the tpl file says:
Code: Select all
<tr>
<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>
</tr>
about the dropdown, and i guess its the "required" class that makes it mandotory? wild guess actually.
Re: 1.5.0.5 How to remove dropdown geozone and country?
Posted: Fri Mar 09, 2012 8:18 am
by thufir
First im sorry to ressurrect this post, but i am in the same situation as the OP.
By browsing around the forums, ive found some solutions to the problem, and managed to remove the dropdown asking for Region and State in the checkout, but only for the payment address part, if i try to do the same in the shipping address part, and under the create user part, the javascript for some reason simply refuses me to press "next".
I believe it is because the javascript is used to check if the fields are set. Im not very good at javascript, so i wonder if anyone could give me a hint or two to get myself in the right direction?
Im using version 1.5.1.3
Thank you all in advance
Thufir