Lightbox - Running a promotion

Hi all,

I’m unsure where to post my enquiry, so please remove it if not allowed.

is there a way to set up a lightbox that can be scheduled to continue to pop up till a specified end date?

Essentially, I’d like to run sales on products but for limited times only. So, I’d alert the visitor there’s a current sale on via the lightbox popup, but I would like the lightbox to hide or become idisabled/inactive after a specified date.

Is there a way to do this?

It seems I can’t even manually hide a lightbox in the wix editor. How strange seeing you can ‘promotion lightboxes’ and promos wouldn’t necessarily run forever. There’s only an option to delete it. It would be a pain to re-do a lightbox every time I run a promo.

Any help gratefully appreciated!

Thank you,
Julian

1 Like

Hi! Great question!

You can accomplish this by, first, creating a database similar to these fields:

Name of lightbox
Start date
End date

Then you would need to write some code on your site tab that:

Checks todays date
Checks the database for any lightbox within that matching date range
Triggers open lightbox

You can read Wix API guide about triggering a light Box here:
https://www.wix.com/corvid/reference/wix-window.html#openLightbox

I recently created a tutorial about timed content. It may give you some ideas on what to do:
https://www.totallycodable.com/example-timed-content

  • CQ

Hi CQ! Many thanks for your reply and information to solve my issue!

II really have no idea when it comes to using Corvid. But I’ll persevere and visit the link you provided and hopefully I can get it working on my wix store!

Cheers!
Julian