Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - MaterialMart (SKU# FLEX-00020)

TOPIC: Disable dropdown menu in product view

Disable dropdown menu in product view 6 years 6 months ago #15321

Hi I created products with multiple children to them. I have a drop down that you can select to go to each child product as this is currently in catalog form. However, I don't really like the material mart drop down since it keeps displaying upwards. I enabled "use jQuery chosen for dropdowns in FE" to display the virtuemart drop down. Though now I have two drop downs so I'm wondering if there is an easy way to disable the material mart drop down or at least fix the issue of it displaying upwards.

Thank you!
The administrator has disabled public write access.

Disable dropdown menu in product view 6 years 5 months ago #15331

Hi,

Unfortunately there is no easy way to disable MaterialMart's dropdown overriding functionality. You have to edit some of the JS files to disable it. But i am little surprised that you prefer jQuery Chosen over MaterialMart dropdown. jQuery Chosen is old-fashion but MaterialMart's dropdown is cutting-edge and cool!! :)

What do you mean "displaying upwards" ? Maybe i can help you with that if you explain it better.

Check this page:
demo.flexiblewebdesign.com/materialmart/vm-categories-2/product-default-layout

Compare the live demo with your website. Does the dropdown look differently on your website?

Regards.
Last Edit: 6 years 5 months ago by Support.
The administrator has disabled public write access.

Disable dropdown menu in product view 6 years 5 months ago #15334

When I open a page and click on the dropdown the dropdown items will display above the select toward the top of the page instead of dropping down. However if you scroll slightly down the page and click on it, then it will display down.

If you visit this page www.thumbweldingsupplies.com/index.php/welding-gases/industrial-gases/oxygen

Don't scroll down at all and you will see the issue I am having.

Thank you
Last Edit: 6 years 5 months ago by David Wineman.
The administrator has disabled public write access.

Disable dropdown menu in product view 6 years 5 months ago #15341

Hi,

Actually that was “feature”. But if you want to disable that feature, that is quite easy to do though.

Open this JS file:
www.thumbweldingsupplies.com/templates/jsn_venture2_pro/html/com_virtuemart/assets/js/materialize.js

find these lines:
if (offsetTop + activates.innerHeight() > windowHeight) {
          // If going upwards still goes offscreen, just crop height of dropdownMat.
          if (offsetTop + originHeight - activates.innerHeight() < 0) {
            var adjustedHeight = windowHeight - offsetTop - verticalOffset;
            activates.css('max-height', adjustedHeight);
          } else {
            // Flow upwards.
            if (!verticalOffset) {
              verticalOffset += originHeight;
            }
            verticalOffset -= activates.innerHeight();
          }
        }

and replace them ALL with these:
if (offsetTop + activates.innerHeight() > windowHeight) {
            var adjustedHeight = windowHeight - offsetTop - verticalOffset;
            activates.css('max-height', adjustedHeight);
        }


FYI: pay attention to the curly braces.. “}” and “{“.. while selecting the lines
The administrator has disabled public write access.
Time to create page: 0.066 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo