• Hello guys! Plz, I need your help!

    What I want to do is:
    In the product page I have a button with the name Weighing!. On click, it must open a modal window – dialog which contains some of the product details, such as sku, weight, price per weight and final price.

    Can I do that with this plugin? If yes, can you please head me in the right direction for this?

    Many thanks!

    https://www.ads-software.com/plugins/modal-dialog/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    If you want to have multiple products on a page and have different dialogs appear with different content, then no, Modal Dialog would not suit that need.

    Thread Starter nikosp

    (@nikosp)

    No, I don’t want that. In the specific product page (single product page), when I click the button it opens a modal dialog and displays product details for the specific product, such as sku, weight, etc.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Ah, I see. Then yes, Modal Dialog could do this. When pressing the button, you would need to call the modal_dialog_open javascript function. You could then create multiple modal dialogs, each with the correct content, and assign each one to a product in the editor.

    Thread Starter nikosp

    (@nikosp)

    Oh, I see. Perfect! So, the details I need, should I call them from the wpdb with sql query? Is that possible?

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    No, it is not possible to send the contents of the dialog to the function to the open function. You need to pre-defined the contents of the dialog in the Modal Dialog Configuration section, one dialog at a time, and separate from the regular editor. It might not be the most user-friendly of working on such a project.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get product details via modal.’ is closed to new replies.