• I am current building a WordPress website. In this website we store the sales of different products in date wise manner. There is a sale page which shows the user the sale report of the current date. For example if user goes to the sale page he will get the sale report of today.

    I have to replicate this feature in another page page where I will show it in Modal Popup window. I know how to make bootstrap modal but i am facing difficulty in creating that sale report feature. Please help me in building this feature?

    Thank you.

Viewing 1 replies (of 1 total)
  • I understand that your sale report feature is currently working for sale page and you now want to replicate it in another page where the sale report will show in bootstrap modal. You can use jQuery to build this feature for another page and that too in minimum amount of code. You will just need a little amount of jQuery understanding.
    Here you use jQuery Load method to build this feature:
    1. First go to the sale page and find out the div id or div class that contains the sale report (use chrome developer tools to find this). Take for example that div id come out to “saleReport”.

    2. Now go to you another page and create the bootstrap modal. Inside that modal create a div and name it anything eg “saleReportNew”.

    3. Most important thing comes now. Add the below jQuery Load method code on your page.

    <script>
    jQuery(document).ready(function () {
    jQuery(“#saleReportNew”).load(“sale #saleReport”);
    });
    <script>

    The above code is using .load() method, and this method calls the sale page and fetches all the content of “saleReport” div. Then it shown this content inside the “saleReportNew” div. So whenever the modal is shown on the page it will show the sale report of the current date.

    I would recommend you to take a look on the syntax and uses of this – jQuery Load method so that you can perfectly understand what I am telling. The jQuery load method is very powerful and you will use is many times in your website for situations like these.

    Thanks & Regards

Viewing 1 replies (of 1 total)
  • The topic ‘How to create a replica of the feature in WordPress website ?’ is closed to new replies.