I
I
iminby2021-06-18 13:23:30
PHP
iminby, 2021-06-18 13:23:30

How to force open data in modal window from opencart?

Guys, tell me, there is a simple modal window on bootstrap.
I insert it next to the product purchase button, in the source code, the product id and its title are transferred to the modal window, but when clicked, it always shows the id of the first product in the product list.

Is it possible somehow without controllers and so on to force the modal window to display the id of the product from the grid on which it is clicked.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Golyagin, 2021-06-18
@webrevenue

Displaying data attributes in a modal window

P
pLavrenov, 2021-06-18
@pLavrenov

I assume that all modals are identical. So he opens the first one he finds.
In the link to the modal add href="modal-<?php $id ?>"
and in the modal add id="#modal-<?php $id ?>"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question