woocommerce offtopic - Single Product Page as a Popup

admin2025-01-07  6

When "Buy Now" is clicked, it opens the Single Product Page in a Popup as you can see 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.

When "Buy Now" is clicked, it opens the Single Product Page in a Popup as you can see 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.
Share Improve this question edited Dec 13, 2021 at 7:19 Buttered_Toast 2,8191 gold badge8 silver badges21 bronze badges asked Dec 13, 2021 at 3:12 GamicordGamicord 1113 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736254536a214.html

最新回复(0)