• Hi,
    pardon the probably stupid question but I’m a newbie to plugin development.
    I need to do a sort of product catalogue.
    I’ve prepared the mysql tables, the db accessor php classes and the domain objects. Now I’m able to read and print (via Div tags) a list of products (picture, name, price).
    This is realized using a shortcode in a static wp page.

    Now the question is: which is the better way to invoke another php function that, after a product is clicked, print another list of the selected product features?

    Thanks in advance
    Fabio

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter picus

    (@picus)

    Hello.
    To make it simpler: I have made a plugin that build a table via DIV.
    I make it available to wordpress pages via a shortcode, e.g. [mytable].
    I’m going mad checking all the internet to understand how can I call another function from there, that replace that table with another table of results, linked to a href=”../” / that are included in the first table.

    I.e. = a table of products is shown. The images are clickable. I need to show the product properties of the cliecked product… but I don’t now how to do it. Can you please help me on the right direction?

    THANKS!!!

    Moderator bcworkz

    (@bcworkz)

    Sorry for the late reply. Just in case you haven’t figured out a solution, I suggest you not focus so much on PHP for dealing with user interaction. You are better off with javascript or jQuery for this.

    Depending on the volume of data involved, you can either send all the information with the initial page, but hide it with CSS. On a click action, the appropriate data can be exposed.

    If there is just too much information for a single page, you could retrieve the needed information from the server with an AJAX request. Then update just the item’s container with more information. No need to reload the entire page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Request for another php function’ is closed to new replies.