Page 1 of 2

Remove "---Please Select---" from dropdown menu.

Posted: Fri Apr 21, 2017 9:05 pm
by hrevis25
Hello,
Could you please tell me how is it possible to remove "---Please Select---" option from dropdown menu in product page?
I tried removing (<option value=""><?php echo $text_select; ?></option>) from catalog/view/theme/default/template/product/product.tpl
but nothing happened.
Any ideas?
Thank you.

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sat Apr 22, 2017 3:41 am
by oclcas
What do you want there in its place?

If they have to select, just make the option "required" - no more "please select", users will have to make a selection

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sat Apr 22, 2017 4:10 am
by hrevis25
Its a bit complicated, but in a few words:
In its place i want the first option to be appeared. Due to the fact that the quantity of the product will be chosen from a drop down menu and the price depends on this, i want to remove ---Please select--- completely from it.
I hope I made myself clear.

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sat Apr 22, 2017 7:18 pm
by cyclops12
Did you clear your cache (including browser cache )once you removed that code from the product.tpl file as this works on default 2.3.0.2

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sat Apr 22, 2017 8:21 pm
by hrevis25
Yeah i did it and still the please select option remains.

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sat Apr 22, 2017 10:14 pm
by cyclops12
Is this for the select option dropdown ??

Did you remove the code from the correct place as there are multiple instances of it in product.tpl ??

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sun Apr 23, 2017 1:35 am
by oclcas
I repeat - just make the option required on the admin side. 99% certain that's the solution you're looking for! No need to touch strings or templates.

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sun Apr 23, 2017 1:43 am
by cyclops12
oclcas wrote:
Sun Apr 23, 2017 1:35 am
I repeat - just make the option required on the admin side. 99% certain that's the solution you're looking for! No need to touch strings or templates.
Sorry but this will not do what op wants
Even when set option to required....
req.JPG

req.JPG (36.85 KiB) Viewed 2583 times

It still shows text ...
req1.JPG

req1.JPG (18.58 KiB) Viewed 2583 times


Re: Remove "---Please Select---" from dropdown menu.

Posted: Sun Apr 23, 2017 6:10 pm
by hrevis25
cyclops12 wrote:
Sat Apr 22, 2017 10:14 pm
Is this for the select option dropdown ??

Did you remove the code from the correct place as there are multiple instances of it in product.tpl ??
Yes i did! There were two instances of the code and removed them both and still nothing! I also made it required and the problem persists!

Re: Remove "---Please Select---" from dropdown menu.

Posted: Sun Apr 23, 2017 7:03 pm
by cyclops12
Silly question but are you using default theme ??

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 12:58 am
by hrevis25
Yes i use the default theme of opencart.

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 1:16 am
by cyclops12
Can you share your url just to rule out a cache issue

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 1:30 am
by hrevis25
Here's the link to a product which has dropdown menu.
http://www.revisios.gr/shop/index.php?r ... duct_id=50

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 1:41 am
by cyclops12
Could you attach your catalog/view/theme/default/template/product/product.tpl

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 1:43 am
by hrevis25
Sure!

Can't attach it.. OMG

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 1:58 am
by cyclops12
Well it is definately removed from there so that file should be fine.
EDIT that file works fine on my default 2.3.0.2 so....
Has your host got any cacheing system in place

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 2:05 am
by hrevis25
I refreshed from extensions > modifications and everything is fine! Thank you!

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 2:09 am
by cyclops12
I did ask if you had cleared cache earlier, suppose i should have said to click the refresh as well

Never mind, as long as it is working now :)

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 2:16 am
by hrevis25
It's ok, my bad too!
Thank you for your quick replies! :)

Re: Remove "---Please Select---" from dropdown menu.

Posted: Mon Apr 24, 2017 2:59 am
by cyclops12
Hey no worries, happy to have been of help

Must make a mod to disable cacheing for testing purposes, its annoying that you have to click on the refresh everytime you make changes lol