Popup trigger

Hello,
is it possible to trigger UB Quick View popup using some javascript code, deciding which product to show?
Thanks

3 answers

Profile photo of ubdev Staff 76860.00 $tone December 16, 2020
Public

Hi Antonio Cavestro,
Thanks for reaching out tous. 

is it possible to trigger UB Quick View popup using some javascript code, deciding which product to show?

Yes, you can add an extra custom JS function to trigger the UB QuickView Popup.

Please let us know the condition about the “products to apply” that you want. We will get back to you then. 
(In case it refers to a complex scenario, you might need to buy a custom work service for that). 
Regards,
Ubertheme team
 

#1
Profile photo of Antonio Cavestro 10.00 $tone December 16, 2020
Public

Hi ubdev, thanks for your answer.
Yes, unfortunately, the scenario is quite complex as you should make the following assumptions:

  • the “products to apply” list is not rendered by Magento
  • the “products to apply” list is loaded asynchronously

As I can see on your demo website, the buttons that trigger the Popup are <a /> tags, embedded in a div.ub-quick-view-btn-container container, with a precise URL as href attribute.
My idea about how your plugin works is (related to JS triggers, at least): at page ready(), it binds a click listener on its div.ub-quick-view-btn-container > a items. The click handler loads product information using the href attribute on the <a /> tag and opens the popup.
If this is correct, even if I render my products list as you do (div.ub-quick-view-btn-container > a items), the triggers won’t work since the list is appended to the page asynchronously.
What do you think?

#2
Profile photo of ubdev Staff 76860.00 $tone December 17, 2020
Public

Hi Antonio, 
We’d like to follow up further below: 

My idea about how your plugin works is (related to JS triggers, at least): at page ready(), it binds a click listener on its div.ub-quick-view-btn-container > a items. The click handler loads product information using the href attribute on the <a /> tag and opens the popup.

Yes, that is right.

Yes, unfortunately, the scenario is quite complex as you should make the following assumptions:
the “products to apply” list is not rendered by Magento
the “products to apply” list is loaded asynchronously

Could you explain in more details the context you’re trying to achieve? We will get back to you once understanding further your requirements. 
Regards,
Ubertheme team

#3

Please login or Register to Submit Answer

Written By

Comments