0

When "Buy Now" is clicked, it opens the Single Product Page in a Popup as you can see here

enter image description here

Now, in this Popup, you notice Featured Image on the left, and Featured Video on the right side, then Product details below the Video.

How do we create something like this? I mean:

  1. Display Single Product Page as a Popup.
  2. Show Featured Image on the left.
  3. Show Featured Video on the right side.
  4. Show Product details below the Featured Video on the right side.

1 Answer 1

0

The question is slightly vague, so forgive a slightly vague answer.... but the way I would do this is by AJAX request.

  1. Click button - add event to listen for the request this would be frontend with Javascript / jQuery and would probably have a post_id to request attached to it.
  2. Load data - you could do this via the Wordpress REST API or add your own endpoint function to return what you need via the established admin-ajax.php (you would be looking for the section titled "Ajax on the Viewer-Facing Side" and look into the wp_ajax_(action) hooks)
  3. Parse your data - load into your pop-up the data returned, making sure to add error handling to explain any issues / connection problems or unexpected data.

If I'm talking nonsense above, then you will need a plugin or some cash to pay someone who knows what they're doing. It's not a massive job though if you have a clear design of what you want and clear functionality steps spec'd out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.