Skip to content

Lightbox integration (including function of delete photos)

Stream edited this page Oct 19, 2018 · 3 revisions

Thanks LusenkoSasha, pasted from #357.


Understood how to do a photo removal when editing a product for example. And also connected lightbox

image The first line is responsible for the appearance of the delete button when adding photos

The second line is for adding lightbox (http://lokeshdhakar.com/projects/lightbox2/) ` I'll give an example with two buttons, if you need two photos for the goods image

Next, we do a loop in which we check the value input, and if the value is not empty, then we assign our delete button, and also assign the data-lightbox attribute to our lightbox for the href_img class.

image

We finished with the code that will show the photo with the ability to delete it when editing the product

Let's start deleting the photo. image

We add the code in lfm.js image

image

image image

Sorry for my english, wrote through google translate.