product attribute – how to change image when we select dropdown value?

I have created a custom dropdown attribute name “manufactures_guarantee_length”,
and its value like 1_year_guaranty,2_year_guaranty,3_year_guaranty, more,
in the product details page, I call that attribute,
now when we change the attribute value in any product that kind of image should change at the front-end product detail page,

for that, I have created a layout file catalog_product_view.xml and guaranty.phtml file,
in phtml file, I code like

<?php $product = $block->getProduct(); ?>
<?php echo $product->getData('manufactures_guarantee_length'); ?>

so I get the value of dropdown, so now how to change like Image as per dropdown?
please suggest me on this.
Thanks in advance.

How can i add search bar above dropdown menu on Google Forms?

There are around 550+ items on the dropdown list, is it possible to filter them out?

Magento 2.3.5 – Currency Dropdown Not showing in default Luma Theme

I have installed Magento 2.3.5 version. I have set all required settings for multi store currency.

We have one main website and 4 store views.

Store View and Currency Setup

Main Website

  • Main Store
    • Store View 1 – UK – Pound
    • Store View 2 – French – Euro
    • Store View 3 – Italy – Euro
    • Store View 4 – German – Euro
  • we have set Base currency as Euro and Store view display currency based on language.
  • Default display currency is Pound because UK is the default store view.

Currency Rates and Currency Symbol

  • Currency Symbol automatically added after setting currency setup
  • Currency Rates are imported manually.

Expected Result:

Currency dropdown and language dropdown at store front end header

Actual Result:

Language Dropdwon only shown. If i print Currency Count in Block file i get zero results.

Block file: Vendormodule-directoryBlockCurrency.php

Function: getCurrencyCount()

Please anyone check this and let me know if anything i have missed or if this magento version have this problem.

8 – Is it possible to combine two filter criteria exposed filter into one dropdown

Is it possible to combine two filter criteria exposed filter into one dropdown. In drupal 8 I am creating a view to search certain content type. One of the content type has three select list field, I do not want to create three seperate exposed filter dropdown on the search page, Is there is a way to combine all into
one exposed filter dropdown ?

Any suggestions and guidance deeply appreciated.

menus – WordPress list categories dropdown with parent-child relation and child under it’s parent

I am attempting to display a category dropdown (select) with parent categories and child categories tagged under the child category. Example:

parent A
parent B
parent C
- child of C
- child of C
- child of C
parent D
parent E
- child of E
- child of E
parent F

Instead what I am getting is the following:

parent A
parent B
parent C
parent D
parent E
parent F
- child of C
- child of C
- child of C
- child of E
- child of E

Here is my shortcode:

function categories_dropdown() { 
  $args = array(
  'taxonomy'          => 'my_custom_taxonomy',
  'hide_empty'        => false,
  'echo'              => true,
  'hierarchical'  => true,
  'show_count'        => false,
  'orderby'           => 'parent', 

$categories = get_categories($args);

$select = "<select name='cat' id='categories_dropdown' class='postform'>n";
$select.= "<option value='-1'>Select category</option>n";

foreach($categories as $category){
  if($category->count > 0){
    if($category->parent!=0) {
      $select.= "<option value='".$category->slug."'> - ".$category->name." (". $category->count .")</option>";
    } else {
      $select.= "<option value='".$category->slug."'>".$category->name." (". $category->count .")</option>";

$select.= "</select>";

return $select;

add_shortcode('categories-dropdown', 'categories_dropdown');

My question here is, which of the arguments are responsible for the correct ordering of the children under the parent taxonomy category? Is this at all done with arguments or is this a matter of the way I have to code the display of the options dropdown? I am really thankful for your time. – How do I add a a dropdown menu in the default asp .net 3.1 razor template

By default, when you create a page in asp .net core 3.1 (in Visual Studio of course) you get a base menus in _layout.cshtml:

<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
    <div class="container">
        <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Axinco.JuryTool.Interface.Gui</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        <div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
            <partial name="_LoginPartial"/>
            <ul class="navbar-nav flex-grow-1">
                <li class="nav-item">
                    <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                <li class="nav-item">
                    <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>

This gives you the following layout:

Default webpage

I added code to download extra menu settings based on the role. Basically, it’s a menuheader (for example ‘Adminisrator’) and then a couple of menu items.

So I want to add a down menu next to “Privacy”.

How would I best do this?

magento2 – Show categories based on first dropdown values in admin form

I have added two components using Ui component in the admin form,
the first one is a simple dropdown and the second one is a category selector

I want to show the parent category and its subcategories based on the values selected from the first dropdown.

how can I do that?

magento2 – Magento 2.3 Dropdown Custom Attribute API Error

I have a dropdown custom attribute with values:

"options": (
        "label": " ",
        "value": ""
        "label": "Green",
        "value": "5640"
        "label": "Blue",
        "value": "5641"
        "label": "Red",
        "value": "5642"

When updating products in Magento 2.2, if I want to set the value to the default (no value chosen), I would use the following in my JSON request body.

"custom_attributes": (
            "attribute_code": "new_color",
            "value": ""

In Magento 2.3, it is not working anymore and the error is

"message": "Error occurred during "custom_attributes" processing. Attribute "new_color" has invalid value. The "" value's type is invalid. The "int" type was expected. Verify and try again.",
"trace": null 

How will I be able to set to the default value if the default value of the custom attribute is “” and not an int type?

Note that in the admin, I can do it by just selecting the default value, but I want to know how it can be done thru the API

enter image description here

dropdown – Immediate friction or further up the journey?


Our booking journey WILL require getting the exact age of any children added to the booking due to tax reasons. We are doing that by providing dropdowns to select the ages of these children.

We don’t have the data to estimate what a good default age is. Therefore if we was to have a default age it would be set at ‘0’ or ‘<1’. We are also testing the initial state of the dropdown as ‘-‘ where the user has to select an age before continuing with journey.


A – If the dropdown is default is ‘0’ or ‘<1’
Could the user ‘skip’ the age selection and complete their booking with incorrect child ages? This affects the price and could frustrate users further down the journey.

B – if the dropdown is ‘-‘
Does this create unnecessary interaction cost? Especially if the alternative state could be more accurate


enter image description here

Would you prefer A or B?

Is there any findings over the impact of immediate friction against user created issues further down the journey (due to lack of error prevention). Also considering the peak end rule and error prevention which could mean option B is preferred.

sierra – How do I transfer Services items out of its drop-down menu and show them all at once when right-clicking?

On macOS Sierra (10.12.6), and I have a similar question as this person, but the offered solutions are no longer applicable: Show all services on right click. Apparently, the OS automatically creates a drop-down menu when 4 services are detected.

How do I get around this? I’d like to view the services at once when I do a secondary click instead of opening the drop-down menu. Thank you in advance.