Post by hrevis25 » Fri Apr 21, 2017 9:05 pm

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.

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by oclcas » Sat Apr 22, 2017 3:41 am

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

New member

Posts

Joined
Wed Sep 14, 2016 11:22 pm

Post by hrevis25 » Sat Apr 22, 2017 4:10 am

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.

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Sat Apr 22, 2017 7:18 pm

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

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Sat Apr 22, 2017 8:21 pm

Yeah i did it and still the please select option remains.

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » 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 ??

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by oclcas » 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.

New member

Posts

Joined
Wed Sep 14, 2016 11:22 pm

Post by cyclops12 » Sun Apr 23, 2017 1:43 am

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 2508 times

It still shows text ...
req1.JPG

req1.JPG (18.58 KiB) Viewed 2508 times


Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Sun Apr 23, 2017 6:10 pm

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!

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Sun Apr 23, 2017 7:03 pm

Silly question but are you using default theme ??

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Mon Apr 24, 2017 12:58 am

Yes i use the default theme of opencart.

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Mon Apr 24, 2017 1:16 am

Can you share your url just to rule out a cache issue

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Mon Apr 24, 2017 1:30 am

Here's the link to a product which has dropdown menu.
http://www.revisios.gr/shop/index.php?r ... duct_id=50

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Mon Apr 24, 2017 1:41 am

Could you attach your catalog/view/theme/default/template/product/product.tpl

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Mon Apr 24, 2017 1:43 am

Sure!

Can't attach it.. OMG

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Mon Apr 24, 2017 1:58 am

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

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Mon Apr 24, 2017 2:05 am

I refreshed from extensions > modifications and everything is fine! Thank you!

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Mon Apr 24, 2017 2:09 am

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 :)

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by hrevis25 » Mon Apr 24, 2017 2:16 am

It's ok, my bad too!
Thank you for your quick replies! :)

Active Member

Posts

Joined
Wed Apr 19, 2017 8:27 pm

Post by cyclops12 » Mon Apr 24, 2017 2:59 am

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

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 72 guests