• Hi guys, Is there any plugin available, that could do this?

    – I need to create 2 dropdown menus, side by side
    – after I select value in each of them, it displays product price
    (depending on values combination chosen from dropdown)

    For example:
    – dropdown menu 1: city 1, city 2, city 3 …
    – dropdown menu 2: [same as menu 1]
    –> If it’s chosen city 1 and city 2 , it returns custom message,
    like “the price is [x] EUR ” ,
    –> if chosen different city, “..price is [y] EUR, … etc.

    Any help appreciated. Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • This would be done using javascript.
    In your child theme you would create a custom page template, it will enqueue your javascript file, and also display in a div with your specific ID a message “Javascript must be enabled in your browser to display prices”.
    The javascript (if it is activated), clears this content and replaces it with your dropdown controls. When the settings are changed the javascript looks up or calculates the price and displays it. Of course if they proceed with a purchase you repeat the calculation in your serverside code, this will prevent anyone giving themselves a discount by hacking your webpage.

    Thread Starter smartinwp16

    (@smartinwp16)

    Hi Ross,

    1.) There’s no purchase, it should just display the info on price
    (for selected combination of dropdown menus)

    2.) I’m no developer so I don’t know about javascript. Is there any simple plugin that could do this function?

    best regards.

    By all means search and try plugins, just maybe you will find one. Even then you will need to use programmers skills to customize it to your requirements.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get product price by selecting from two dropdown menus?’ is closed to new replies.